Basic image rotation with jQuery -
I would like to test the banner (two CSS background images) and rotate them randomly on each page reload. Is it possible to achieve something without using any plugins?
I just need to rotate two images, which basically just swap the CSS squares on the banner element at each reload .
Many thanks.
Since you have specifically asked to specify a CSS class, there is a jquery function such that To:
$ (function () {var id = Math.floor (Math.random (* * 10); $ ("# banner") AddClass ("className" + ID);}
There are some more functions related to this, you can get the document here:
Comments
Post a Comment