JSFiddle - React, Tailwind, and code Playground
by Eric Howe
HTML
<div id="one">xyz</div>
<div id="two">abc</div>
<input id="reverse" type="button" value="Reverse" />
JavaScript
$('#reverse').click(function() {
var $one = $('#one');
var $two = $('#two');
$one.removeAttr('id');
$two.attr('id', 'one');
$one.attr('id', 'two');
});