Move 'Ajax indicator image' with cursor


/ Published in: jQuery
Save to your folder(s)

Move 'Ajax indicator image' with cursor


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.