I created a requireJs module where I already put all the functions:
define(['Scrollbar','module'],function(Scrollbar,module){
return{
init:function(){
//CODE
},
manageScroll:function(){
//CODE
},
manageResize:function(){
//CODE
},
transform(){
//CODE
}
}
});
In the init section I defined a handler Jquery on the resize which recall a function on this object
I tryied in this way:
init:function(){
this.transform();
jQuery(window).resize(this.manageResize());
},
But it dosn’t work, the only solution I found is this one here below, but it doens’t work on IE.
init:function(){
this.transform();
jQuery(window).resize(()=>this.manageResize());
},
Do you have any suggestion or better solution?
Thanks