html - jQuery tooltips in good place only when hovering over label from bottom -
i want add jquery ui tooltips placed above label. position depends on scrolled page. when label close bottom of page tooltip close it. higher label in browser window, higher tool tip in relevance label. tooltip displayed next label when hover bottom. tried position: during initialization it's not working...
.js
$("label.info").tooltip(); .tpl file
<label class="info" title="tooltip text"><img src="/img.png" id="someid" style="float:right; cursor: pointer" title="something" alt="img"/></label> update:
thanks help, turned out jquery 1.7.1 version + ui 1.8.1 version without tooltips + jquery.ui.tooltips fault. got new versions, integrated , fine.
ok. there documentation here: http://api.jqueryui.com/tooltip/#option-position
you need post code really.
i made basic function akin tooltip here: http://jsfiddle.net/wkex8/
you use jquerys offset() function position tooltip in relation mouse. think trying add positioning image, incorrect.
thankfully nice folks @ jquery ui have made function easier use, example:
// getter var position = $( ".selector" ).tooltip( "option", "position" ); // setter $( ".selector" ).tooltip( "option", "position", { my: "left+15 center", at: "right center" } );
Comments
Post a Comment