Team:UCL/Template:MainJS
From 2014.igem.org
(Difference between revisions)
Lewismoffat (Talk | contribs) |
Lewismoffat (Talk | contribs) |
||
Line 1: | Line 1: | ||
<script> | <script> | ||
+ | |||
( function( $ ) { | ( function( $ ) { | ||
Line 29: | Line 30: | ||
} )( jQuery ); | } )( jQuery ); | ||
+ | |||
+ | |||
</script> | </script> |
Revision as of 10:25, 31 July 2014
<script>
( 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 );
</script>