javascript - Self reference in $.fn jquery -


is there anyway can refer "mousewheelevent" property "beforeslide" method?

$(document).ready( function() { $(".main").hide(); var des = false; var scorll = false; var slider = $.fn.fsvs({     speed : 1000,     bodyid : 'fsvs-body',     selector : '> .slide',     mouseswipedisance : 40,     afterslide : function(){},     beforeslide : () => {         if($("#slide-3").hasclass("active-slide") && !des){             $('#fsvs-body').bind('mousewheel', function(e){                 if(e.originalevent.wheeldelta /120 > 0) {                     console.log("up");                 }                 else{                      $(".main").fadein(200, function(){                         $("html").addclass("des");                          $("#fsvs-body").addclass("des");                         des = true;                         scorll = false;                         $('html, body').animate({                             scrolltop: 200                         }, 200);                         console.log(scorll);                            });                 }                 $('#fsvs-body').unbind('mousewheel');             });         }     },     endslide : function(){},     mousewheelevents : scorll,     mousewheeldelay : false,     scrollablearea : 'scrollable',     mousedragevents : true,     touchevents : true,     arrowkeyevents : true,     pagination : false,     nthclasses : false,     detecthash : true, }); $(window).scroll(function(){     console.log($(document).scrolltop());     if(des){         if($(document).scrolltop() == 0){             $(".main").fadeout(200, function(){                 $("html").removeclass("des");                 $("#fsvs-body").removeclass("des");                 des = false;                 console.log(scorll);              });          }     } }); 

});

i want toggle mousewheelevent in beforeslide , in $(window).scroll want mouse wheel true in $(window).scroll , false in beforeslide.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -