Play with Div using jQuery or Javascript -
I want to take the specific device up to the link. Similar to moving the Div down on the down link, as shown in the screenshot, I want to insert the Div at the 'IB' link before the specific divis. I want to design the 'IA' link after a specific div To remove a specific device on the 'D' link.
But someone The feedback will also be highly appreciated ...
Edit: Screenshots link is now!
jQuery definitely makes this type of thing a bunch easier.
Looking at this simple markup:
& lt; Div class = "moveable" id = "div1" & gt; A & lt; A href = '#' square = "top" & gt; Go up & lt; / A & gt; & Lt; A href = '#' square = "bottom" & gt; Move down & lt; / A & gt; & Lt; Br / & gt; & Lt; / Div & gt; & Lt; Div class = "playable" id = "div2" & gt; Two & lt; A href = '#' square = "top" & gt; Go up & lt; / A & gt; & Lt; A href = '#' square = "bottom" & gt; Move down & lt; / A & gt; & Lt; Br / & gt; & Lt; / Div & gt; & Lt; Div class = "movable id =" id = "div3" & gt; Three & lt; A href = '#' square = "top" & gt; Go up & lt; / A & gt; & Lt; A href = '#' square = "bottom" & gt; Move down & lt; / A & gt; & Lt; Br / & gt; & Lt; / Div & gt;
This jQuery will take an element up or down:
$ ('.ableable.ap'). Live ('click', function () {Var $ div = $ (this) .Parent ('moveable'); var idx = $ div.index (); if (idx & gt; 0) {$ div.remove ( ); $ ('Div.moveable: Eq (' + (idx-1 + + ')'). Earlier ($ div);} return false;}); $ ('. Movable a.down'). Live ('click', function () {var $ div = $ (this) .Parent ('moveable'); var idx = $ div.index (); if (idx & lt; $ ('div.moveable') Length -1) {$ div.remove (); $ ('div.moveable: eq (' + idx + ')'). After ($ div);} return false;});
You must be sufficient to start putting in
If you want a demo, then here is Bela:
Comments
Post a Comment