Monday, 15 February 2010

wowjs - How to use a JavaScript animation effect inside a loop? -


I'm trying to add JavaScript animation effect so that I can start it:

 < Code> & lt; Top & gt; & Lt; Link rel = "stylesheet" href = "css / animate.css" & gt; & Lt; Script src = "js / wow.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; New wow () Init (); & Lt; / Script & gt; & Lt; / Head & gt;  

and I placed square effect ( wow slideInRight ) inside my div :

  & lt is ; Div class = "line row -sm pader-LG" & gt; & Lt ;? Php foreach ($ top-> Track-> Track $ key = & gt; $ value) {if ($ ki; = $ this-> config- & gt; Items (" Item_top ")) back false; $ Image = $ value- & gt; Image [3] - & gt; Text; If ($ image == '') $ image = $ value- & gt; Image [2] - & gt; Text; If ($ image == '') $ image = base_url () "Property / Picture / No-cover .png"; ? & Gt; & Lt; Div class = "colonel-xs-6 call-sm-4 column-md-3 black-lg-2" & gt; & Lt; Div class = "item wow slides enright" & gt; & Lt; Img style = "background: url ('& lt ;? php echo $ image ;? & gt;')" /> & Lt; / Div & gt; & Lt; / Div & gt; & Lt ;? Php}? & Gt; & Lt; / Div & gt;  

The problem is that instead of showing the effect of each single item, this javascript shows the effect at the same time for all items. What is the correct way to use this javascript on the loop?

WOW.js initialization & lt; Body & gt; not gt; , something like this: