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

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -