So I have a plugin – jScrollPane – http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html – which is awesome, but, I want to apply it to an Ajax-generated div.
How would I use jScrollPane in conjunction with jQuery’s live()? Further info on live() can be found here: http://api.jquery.com/live/
Thanks!
Jack
The
live()method is great when you want to bind an element to an event, but what event would you use to keep the plugin persistant? I don’t think there is one…What you can do instead is put the initial plugin bind in a function, then call that function after your ajax generated div is in place, like this:
I’m not entirely sure if this is the best way to solve your problem, but this is how I have been doing it.