I've got a jQuery plugin scroll effect on my website, which I would like to turn off for screen sizes under 740px. I found a post that was similar to mine and tried what they suggested there, but all it does is turing off my plugin completely, no matter what screen size. I'm not sure which part of the script is malfunctioning.
Here's the script:
if(screen.width < 740) {
return;
} else {
$(function() {
$.scrollify({
section : "section",
});
});
$.scrollify({
section : "section",
sectionName : "section-name",
easing: "easeOutExpo",
scrollSpeed: 1100,
offset : 0,
scrollbars: true,
before:function() {},
after:function() {},
afterResize:function() {}
});
}
Does anyone have an idea what's wrong with this?
Thanks, Lisa