When I scroll the div, basically nothing happens. The method slideIt
gets fired once when the object is initiated and that is it. It is not listening to the scrolling event! any reason why would this happen?
function fixed_column_or_row(container_name){
this.container_div=$(container_name);
this.scrollable_div=this.container_div.find(".simplebar-content-wrapper");
this.fixed_row=this.container_div.find(".fixed-row")
this.fixed_column=this.container_div.find(".fixed-column")
//the issue in this line
this.scrollable_div.scroll(this.slideIt())
}
fixed_column_or_row.prototype.slideIt=function(){
var scrollTop = this.scrollable_div.scrollTop(),
scrollLeft = this.scrollable_div.scrollLeft();
console.log("scrollTop")
this.fixed_row.css({
"margin-left": -scrollLeft
});
this.fixed_column.css({
"margin-top": -scrollTop
});
}