更改工具提示位置/箭头
Change tooltip position/arrow
我已经在我的区域地图中创建了一个工具顶,我正在使用http://qtip2.com/
当我调用工具提示时,我的代码与这个问题中的相同
地图区域标签上的工具提示jQuery(document).ready(function (e) {
jQuery('area').qtip({
style: {
classes: 'qtip-dark'
},
events: {
show: function(event, api) {
api.set({
'content.text': api.elements.target.attr('title')
});
}
}
});
});
但是我的工具提示总是在我的区域的右下角,有没有办法我可以把它放在我的右上角?
找到下面的答案,它会对你有所帮助。
jQuery(document).ready(function (e)
{
jQuery('area').qtip({
style:
{
classes: 'qtip-default qtip qtip-light qtip-rounded',
width: '250px',
height: '70px',
tip: true
},
position:
{
my : 'bottom left',
at: 'top right',
adjust: {
method: 'none none', // Requires Viewport plugin
resize: true
},
},
events:
{
show: function(event, api)
{
api.set
({
'content.text': api.elements.target.attr('title')
});
}
}
});
});
感谢Chiral Patel的评论,我找到了一个方法,谢谢!
jQuery(document).ready(function (e)
{
jQuery('area').qtip({
style:
{
classes: 'qtip-default qtip qtip-light qtip-rounded',
width: '250px',
height: '70px',
},
position:
{
my : 'bottom left',
at: 'top right',
method:'none'
},
events:
{
show: function(event, api)
{
api.set
({
'content.text': api.elements.target.attr('title')
});
}
}
});
});
相关文章:
- jquery试图按名称获取按钮位置
- 我可以获得相对于被点击元素的确切点击位置吗
- 谷歌地图固定位置覆盖
- 在单击任何位置时隐藏元素,而不检查每次DOM单击
- Twitter 引导中的图标箭头位置 - 折叠插件
- TableSorter:如何更改排序箭头的位置
- text使用shift键和箭头键时的区域插入符号位置
- 带有方向箭头的地理位置 api
- D3 强制有向节点作为文本 - 计算相对箭头指向位置
- YouTube,在PlayerReady上,使用for循环获取数组中与单击箭头位置匹配的视频ID并播放
- 如何在Javascript/Mootools中根据页面上不同对象的位置定位箭头
- 使用javascript中的箭头光标键代码更改光标位置
- 将箭头返回原始位置
- 更改手风琴箭头位置
- 更改工具提示位置/箭头
- 防止“向上箭头”;键在文本框内重置光标位置
- jQuery指南针-在光标位置上旋转的箭头
- 一旦设置好,引导弹出箭头将不会随着数据位置的变化而改变
- 有麻烦的位置我的箭头与unslider jQuery插件
- jQuery翻转箭头图标基于折叠位置