Show information near mouse pointer problem
I hava available JQuery and Dojo and I need to display info near mouse pointer (like tooltip). To be more clear, I have Dojo slider and while user sliding I need to show around m开发者_StackOverflowouse like tooltip some info ( hours and minutes ). How to solve this ? Is there any already done functions for this in Dojo or Jquery or JavaScript ?
JQUERY UI POSITIONING
http://docs.jquery.com/UI/Position
This is the perfect api to get your job done.Add a label in page in body any where initially hidden and in onchange event simply position it along your mouse pointer and with the updated text content.Thats what i did.
Make sure it is absolute position
$(document).mousemove(function(ev){
$("#position4").position({ my: "left bottom", of: ev, offset: "3 -3", collision: "fit" }); });
This code will actually add the reference div on mouse position every time but you can customize it as your requirement
精彩评论