I\'m wondering if it\'s posible to switch positions of two divs with jQuery.
I have two div like this
STUFF ONE
Well ... why are you trying to change the POSITION of the div elements. Does it matter? Why not changing the CONTENT?
var divOneText = $('#div1').html();
var divTwoText = $('#div2').html();
if (divOneText != '' && divTwoText != '') {
$('#div1').html(divTwoText);
$('#div2').html(divOneText);
}
Add trim() if you want to remove whitespace.