I have two div's
<div id="one">xyz</div>
<div id="two">abc</div>
<input id="reverse" type="button" value="Reverse" />
On click of the button, the the id's of the div needs to get interchanged.
$('#one').attr('id', 'two');
$('#two').attr('id', 'one');
would obviously be false, can anyone help me regarding this?