Skip to content Skip to sidebar Skip to footer

Jssor - Unbinding The Event

I have a simple event handler: jssor_slider1.$On($JssorSlider$.$EVT_CLICK, function (slideIndex) { jssor_slider1.$PlayTo(slideIndex - 4, [200]); }); I have a problem trying to

Solution 1:

function SliderParkEventHandler(slideIndex) {
    jssor_slider1.$PlayTo(slideIndex - 4, [200]);
}

jssor_slider1.$On($JssorSlider$.$EVT_CLICK, SliderParkEventHandler);

//use following code to unbind click event
//jssor_slider1.$Off($JssorSlider$.$EVT_CLICK, SliderParkEventHandler);

Post a Comment for "Jssor - Unbinding The Event"