Posted By

kzelda on 04/26/12


Tagged

jqueryjavascript


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

BrockSamsom


Move 'Ajax indicator image' with cursor


 / Published in: jQuery
 

Move 'Ajax indicator image' with cursor

  1. $("body").append("<img id='imgwait1' class='ajax-indicator' src='indicator.gif' style='position:absolute,top' ></img>");
  2. $(document).mousemove(function(e){
  3. $('#imgwait1').offset({left:e.pageX+10,top:e.pageY});
  4. });
  5.  
  6.  
  7. $('#imgwait1').remove();
  8. $(document).unbind('mousemove');

Report this snippet  

You need to login to post a comment.