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.s开发者_如何学运维tatusTooltips = {
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'
}
}
});
it's simpe enough:
$("#mytip").qtip({style: { tip: { size: { x: 10, y: 10}} }});
http://craigsworks.com/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.com/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 :)
精彩评论