Hay all, i have a basic big of jQuery. What I’m trying to do is take the first div from a group of div and make it become the last div in the group, the HTML looks like this
<div>
<div id=1></div>
<div id=2></div>
<div id=3></div>
<div id=4></div>
</div>
I’m im using
$("div div:first").after( $("div div:last") );
However it isn’t working.
any ideas?
You’ve got your elements backwards. The first selector needs to select the element you want to insert after and the second selector takes the element you want to insert: