My brother sent me a "salary survey" with one question, "Are you happy with your current salary," where the "No" button ran away from the mouse. I thought it might be useful for gag sites, so I created a jquery plugin that mimics that effect, at http://bililite.nfshost.com/blog/blogfiles/keepaway.html. It's easy enough to use, just $(selector).keepaway(options) ,with options of
  • jump: the distance to jump away from the mouse, in pixels; default 500
  • speed: the speed to move (passed intact to the animate plugin); default 'fast'
  • home: time to return to the starting position if nothing happens, in ms; default 1000
Have fun!

Leave a Reply


Warning: Undefined variable $user_ID in /home/public/blog/wp-content/themes/evanescence/comments.php on line 75