Team:UCL/Template:main.js
From 2014.igem.org
Revision as of 13:26, 1 October 2014 by Lewismoffat (Talk | contribs)
( function( $ ) {
function disableSkrollr(){ console.log('we are on mobile');
var s = skrollr.init(); s.destroy(); }
function enableSkrollr(){
console.log('we are on desktop');
var s = skrollr.init({ forceHeight: false });
}
$(document).ready(function() { Modernizr.load([ //first test need for polyfill { test: window.matchMedia, nope: "https://2014.igem.org/Team:UCL/Template:polyfill.js?action=raw&ctype=text/javascript" },
//and then load enquire "https://2014.igem.org/Team:UCL/Template:enquiremin.js?action=raw&ctype=text/javascript", /*"/path/to/your/script.js"*/ ]);
/* enquire.register("screen and (min-width: 768px)", {
match : function() { enableSkrollr(); }, unmatch : function() { disableSkrollr(); } });*/
});
} )( jQuery );