I'm having trouble adding scrollable to a dynamically generated div.
$(".feedPane").scrollable({items: '.feedItems', vertical: true, mousewheel: true});
This works fine with static divs but once I created another one it doesn't work for it.
So, how do you create scrollable for dynamic elements?
开发者_如何学Cedit: What solved the problem is creating new dynamic scrollable with a different id. I can only contemplate the reason - probably a clash with the first scrollable defined.
Since your dynamically created div wasn't around when you added scrollable to the objects with class feedPane, it didn't get scrollable called on it. To fix this you will have to call scrollable on the div after you create it.
精彩评论