I want to prompt the user that something special has happened, so I want to shake the page or blink the whole page. How can I do this in JavaScript?
+4
A:
It will be really easy if you use jQuery for this and you can use animate of jQuery to do this.
or you can use jQuery UI Effects to do this!
Mahesh Velaga
2010-04-18 06:01:16
any way to do in simple javascript?
vakas
2010-04-18 06:04:10
@vakas: not that I know of, more over there might be some compatibility issues, so its better to use a framework like jQuery which takes care of these things internally.
Mahesh Velaga
2010-04-18 06:16:59
jquery is just a library of javascript. it is opensource. a few minutes should be enough to get that effect you want if you already know coding in javascript.
iamrohitbanga
2010-04-18 06:17:04
I would use jQuery. Its lightweight, the user doesnt have to install anything, it will save you a lot of hassle. If you want to see how it works, simply step through the code in the library and move it into your own function (but remember to include the notice from the jQuery file)
James Westgate
2010-04-18 06:17:18