Advertisement
rana

Tooltip Problem js

Nov 26th, 2011
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function(){
  2.     $('div[tooltip="true"]').hover(
  3.         function(e){
  4.             x = e.clientX;
  5.             y = e.clientY;
  6.             newX = x + 10;
  7.             newY = y + 5;
  8.             $('#tool_tip_text_content').css({'left':newX, 'top':newY});
  9.             html_content = '<p>Some Html content</p>';
  10.             $('div#tool_tip_text_content').html(html_content);
  11.             $('#tool_tip_text_content').slideDown(500);
  12.         },
  13.         function(e){
  14.             $('div#tool_tip_text_content').html('');
  15.             $('#tool_tip_text_content').slideUp(0);
  16.         }
  17.     );
  18. });
  19.  
  20.  
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement