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');     }  }); 

docs


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -