Monday, 9 September 2013

Change DOM stacking order for mobile

Change DOM stacking order for mobile

want to know how to change the DOM stacking order for mobile using jQuery
so we dont have to use php. Currently I am trying:
jQuery(document).ready(function(){
jQuery(window).resize(function() {
if (jQuery(window).width() < 768) {
var sidebar1 = document.getElementById("sidebar1");
var body = document.getElementById("right");
jQuery(sidebar1).after( jQuery(right) );
}
});
});
The HTML:
<div class="row-fluid">
<div id="sidebar1" class="span3">
<div id="right" class="span9">
I might need to use insertAfter or prepend, but not sure. Thanks

No comments:

Post a Comment