I'm trying to incorporate a jQuery plugin by Codrops - that make turns the menu into a bar on the left and bottom. I'd like to use the same menu as a normally top bar on desktop screens, just changing the styles of the id and classes that come with the demo. I was wondering whats the best Javascript solution to include the plugin's scripts on max-width of 768 and then remove them on anything larger. I'd like it to self check and update on browser resize too. Here's what I have so far...
<script>
(function() {
if( window.innerWidth > 600 ) {
$.getSscript("assets/js/modernizr.custom.js");
$.getSscript("assets/js/classie.js");
$.getSscript("assets/js/borderMenu.js");
}
})();
</script>