jquery - Apply same function in data-rel order -


I have several objects that I delays () and want to apply. Fidine () function but the function needs to be applied in the order of data-reliance numbers.

In addition, I need to delay the increment of 100 for each object ...

Here is a worksheet.

I want to delay it with the requirement of data-rel = "1" with 0 data-rel = "2"

; Div class = "feedin" & gt; & Lt; P class = "m" data-relay = "1" & gt; 1 & lt; / P & gt; & Lt; P class = "m" data-relay = "3" & gt; 2 & lt; / P & gt; & Lt; P class = "m" data-relay = "2" & gt; 3 & lt; / P & gt; & Lt; / Div & gt;

script:

  $ (".me") .hide (); $ (".me") .each (function () {$ (this) .delay (0). FadeIn (500);});  

simply calculate by value in delays Code> Relay

  $ (".m"). Each (function () {var el = $ (this), rel = el.data ("rel"), delay = (relay -1) * 100; l. delay (delay). Fade (500);});  


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -