Wednesday, 15 September 2010

jQuery function loading images in a random order -


I found this good job, which does image fade from 1 to image 4 in and out of content. But if I refresh the page randomly to load images?

image2, image4, image, 1 image3

This idea is to get a random order every time I refresh the page.

  $ (function () ($. Fadein p: gt (0) '). Hide (); Set interval (function () ($ ('. Fadein & gt;: First-child ') .FadeOut (). Next (' P ') .FadeIn (.) End (). Attachment (' .fadein ');}, 3000);});   < P> HTML  
  

Image1 & lt; p & gt; Image2 &
Image3 & lt; / p & gt; & lt; p & gt; Image4 & lt; / p & gt; & lt; / div & gt;

If you have no problem with this light weight plugin,

 < Code> $ (document) .ready (function () {$ (".fadein"). Alteration ();});    

No comments:

Post a Comment