Skip to content

Instantly share code, notes, and snippets.

@danielck
Created March 23, 2013 01:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielck/5225932 to your computer and use it in GitHub Desktop.
Save danielck/5225932 to your computer and use it in GitHub Desktop.
// Load asides
var asideLoader = $('#load-asides');
var asideContainer = $('#sidebar');
var loadAsides = function () {
var href = asideLoader.attr('href');
asideContainer.load( href + ' #sidebar-content');
}
// Check for screen width and load asides if we're wide enough
if ( document.documentElement.clientWidth > 768 ) ) {
loadAsides();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment