html5 - Change place of DOM elements with jQuery -


i want change places of dynamic elements in webpage jquery, here code have code.

<div class="div1"><label>name</label></div>  <div class="div2"><label>address</label></div>  <div class="div3"><label>user no</label></div>

and how want jquery @ run time

<div class="div1"><label>name</label></div>  <div class="div3"><label>user no</label></div>  <div class="div2"><label>address</label></div>

i want move div2 after div3. in advance!

try use .insertafter(selector) @ context,

$("div.div2").insertafter(".div3"); 

demo


Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -