Skip to content

Instantly share code, notes, and snippets.

@thykka
Forked from anonymous/gist:9612772
Created March 18, 2014 17:02
Show Gist options
  • Save thykka/9624427 to your computer and use it in GitHub Desktop.
Save thykka/9624427 to your computer and use it in GitHub Desktop.
$(window).resize(changeorder);
$(document).ready(changeorder);
function changeorder(){
//inner page reordering
if ($(".page-left-column").css("float") == "none" ){
$( "#information-widget" ).appendTo( ".page-right-column" );
}
if ($(".page-left-column").css("float") == "left" ){
$( "#information-widget" ).prependTo( "#information-widget-container" );
}
//homepage reordering
if ($(".home-left-column").css("float") == "none" ){
$( "#information-widget" ).prependTo( ".home-right-column" );
$( "#programs-widget" ).prependTo( ".home-left-column" );
}
if ($(".home-left-column").css("float") == "left" ){
$( "#information-widget" ).prependTo( "#information-widget-container" );
$( "#programs-widget" ).prependTo( "#programs-widget-container" );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment