I using zynga scroller javascript for scrolling in backbone web-app but clientHeight of rendered element is always 0. This is because script for scrolling is loaded and executed before backbone render method.
render: function(){
var persons = this.model;
var personsCollection = new PersonsCollection(persons);
this.el.innerHTML = _.template( personsTemplate,{data : _.groupBy(personsCollection.toJSON(), 'status')} );
console.log(this.el.clientHeight); // ========= 1500
new EasyScroller(this.el, {scrollingX: false, scrollingY: true});
},
Is possible to execute loading of scroller javascript after render? Or any other solutions? From scrolling script:
EasyScroller.prototype.reflow = function() {
this.scroller.setDimensions(this.container.clientWidth, this.container.clientHeight, this.content.offsetWidth, this.content.offsetHeight);
};
Thank you for any help!