tags:

views:

136

answers:

2

Hi guys,

I wanted to create a page with a simple button which runs away from the user when he tries to click it. Lets call it the Run away button?

Is there a simple 'jQuery' snippet which will allow me to do the same?

Regards, Karan Misra

+5  A: 
$('button').hover(function()
{
    $(this).css('top', rand(1,1000) + 'px').css('left', rand(1,1000) + 'px');
});

No plugin needed.

Coronatus
+4  A: 

Catch me if you can

alt text

Anurag
Haha, that is hilarious. +1 for the cool website too.
Coronatus
lol as close as i could get to spongebob squarepants :)
Anurag