Team:UCL/Template:MainJS

From 2014.igem.org

(Difference between revisions)
Line 4: Line 4:
console.log('we are on desktop');
console.log('we are on desktop');
-
// Enable Skroll only for non-touch devices
 
-
//if(!Modernizr.touch){
 
var s = skrollr.init({
var s = skrollr.init({
            forceHeight: false
            forceHeight: false
        });
        });
-
        //}
 
}
}

Revision as of 10:24, 31 July 2014

( function( $ ) {

function enableSkrollr(){ console.log('we are on desktop');

var s = skrollr.init({ forceHeight: false });

}

function disableSkrollr(){ console.log('we are on mobile');

// Destroy Skrollr var s = skrollr.init(); s.destroy(); }

enquire.register("screen and (min-width: 768px)", { match : function() { enableSkrollr(); }, unmatch : function() { disableSkrollr(); } });

} )( jQuery );