Introduction
Another funny script. Each time you enter a button with your mouse, the button moves to a random location making it impossible to click. Can be very annoying. But a fun idea for April's fool!Requirements
jQueryCode
(function jumpingButton() {// getting window size
var windowsize = { height: $(window).height(), width: $(window).width() };
// affecting all buttons
$('button, input[type="submit"], input[type="image"]').mouseover(function () {
$(this).offset({
top: Math.round(Math.random() * windowsize.height),
left: Math.round(Math.random() * windowsize.width)
});
});
})();