admin管理员组文章数量:1278886
I'm having some trouble with modifying qTip's tip size (x,y).
I tried to add the style: { tip: { x:2,y:2 } }
in all sorts of ways, but failed.
How can I add it to the following script?
// Status Tooltips Style
$.fn.qtip.styles.statusTooltips = {
background: '#333333',
color: 'white',
textAlign: 'center',
border: {
width: 1,
radius: 5,
color: '#333333'
},
tip: 'leftMiddle',
name: 'dark'
}
// Status Tooltips Init
$('.status[title]').qtip({
style: 'statusTooltips',
position: {
corner: {
target: 'rightMiddle',
tooltip: 'leftBottom'
}
}
});
I'm having some trouble with modifying qTip's tip size (x,y).
I tried to add the style: { tip: { x:2,y:2 } }
in all sorts of ways, but failed.
How can I add it to the following script?
// Status Tooltips Style
$.fn.qtip.styles.statusTooltips = {
background: '#333333',
color: 'white',
textAlign: 'center',
border: {
width: 1,
radius: 5,
color: '#333333'
},
tip: 'leftMiddle',
name: 'dark'
}
// Status Tooltips Init
$('.status[title]').qtip({
style: 'statusTooltips',
position: {
corner: {
target: 'rightMiddle',
tooltip: 'leftBottom'
}
}
});
Share
Improve this question
edited Jul 8, 2010 at 22:56
Brock Adams
93.6k23 gold badges241 silver badges304 bronze badges
asked Jul 6, 2010 at 7:33
Tomer LichtashTomer Lichtash
9,26216 gold badges57 silver badges73 bronze badges
1
- 1 qTip's documenation on this: craigsworks./projects/qtip/docs/reference/#style – Tomer Lichtash Commented Jul 6, 2010 at 7:38
3 Answers
Reset to default 10it's simpe enough:
$("#mytip").qtip({style: { tip: { size: { x: 10, y: 10}} }});
http://craigsworks./projects/qtip/docs/tutorials/#tips
For qtip 2, you can just set the width
and height
properties of the tip
object:
$("#mytip").qtip({
style: {
tip: {
width: 10,
height: 10
}
}
});
See http://qtip2./plugins#tips.width
Got it!
$('.status[title]').qtip({ style: {background:'#333333', color:'white', textAlign:'center', border:{width: 1, radius: 5, color: '#333333'}, tip:{corner:'leftMiddle',size: { x:6,y:10 }} }, position: {corner: {target:'rightMiddle',tooltip:'leftBottom'}} });
Thanks, StackOverflow, for being an occasional rubber duck :)
本文标签: javascriptHow to set the tip dimensions with jQuery qTIpStack Overflow
版权声明:本文标题:javascript - How to set the tip dimensions with jQuery qTIp? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741244045a2364535.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论