Created
October 24, 2013 20:03
-
-
Save astockwell/7144031 to your computer and use it in GitHub Desktop.
Enquire! "True" on line 46 activates this breakpoint for non-supporting browsers (IE!!!).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ========================================================================== // | |
// Media Query JS support | |
// ========================================================================== // | |
$(function(){ | |
mq_desktop = 620; | |
// Initial setup (all breakpoints) | |
$(document).ready(function() { | |
// Setup learnmore blocks | |
$('.learnmore').hide(); | |
}); | |
// Mobile breakpoint | |
enquire.register("screen and (max-width: " + (mq_desktop-1) + "px)", { | |
match : function() { | |
$('.mobile-links').click(function(e){ | |
e.preventDefault(); | |
$(this).next().slideToggle(); | |
}); | |
}, | |
unmatch : function() { | |
$('.mobile-links').off(); | |
} | |
}); | |
// Desktop breakpoint | |
enquire.register("screen and (min-width: " + mq_desktop + "px)", { | |
match : function() { | |
// Fix iPad Orientation | |
// checkOrientationforiPad(); | |
// Initialize Desktop | |
sidepages(); | |
show_scroll_down_icon(); | |
// Start the SHOW :) | |
fluidic_initialize(); | |
}, | |
unmatch : function() { | |
// alert('leaving desktop size'); | |
}, | |
setup : function() { | |
//ajax load desktop js file (opt) | |
}, | |
deferSetup : true | |
}, true); | |
// Parallax breakpoint (> iPad dimensions) | |
enquire.register("screen and (min-width: 1025px)", { | |
match : parallax_backgrounds | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment