javascript - jQuery: Remove a function call -
i have function plugin looking …
$('.parallax-sections').parallax();
i want function responsing in onresize event , applied window larger 700px.
$(window).on("resize", function (e) { if ($(window).width() < 700) { // remove or disable function again ??? //$('.parallax-sections').parallax(); } else { $('.parallax-sections').parallax(); } });
you can disable
, enable
it.
$('.parallax-sections').parallax(); $(window).on("resize", function(e) { if ($(window).width() < 700) { $('.parallax-sections').parallax('disable'); } else { $('.parallax-sections').parallax('enable'); } });
Comments
Post a Comment