$(document).ready(function(){
var $windows = $('.window');
$windows.windows({
snapping: true,
snapSpeed: 200,
snapInterval: 800,
onScroll: function(s){},
onSnapComplete: function($el){},
onWindowEnter: function($el){}
});
});
Hi I need to know how to disable this script based off of the browser width. So I want the snapping to be false when the browser is less than 440px.
Sorry if I haven't worded this greatly and thanks!
Replace true with a conditional that will evaluate to true or false when you want to
$windows.windows({
snapping: $(window).width() > 440 || $(window).height() > 440, //will be false when either dimension is less than 440, other wise it will be true
snapSpeed: 200,
snapInterval: 800,
onScroll: function(s){},
onSnapComplete: function($el){},
onWindowEnter: function($el){}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With