I have a form that dynamically changes when a button and/or link is clicked, and I am using jScrollPane in a div located inside the form called ".softcontent".
When the content开发者_如何学编程 in the form changes the jScroll function does fire again.
So my question is: How do I trigger my jScrollPane function when the content in the form changes so the new content that fills the form have the same scrollpane?
The jScrollpane function:
$(function scrollbar() {
$('.softcontent').jScrollPane();
});
Please let me know if I need to provide more or further detailed information, Thank you.
I do not fully understand "so the new content that fills the form have the same scrollpane?", but I believe it is irrelavant.
You bind an event to all form inputs: $('#my-form input').change(function(){ ... });
Just do whatever you need inside the handler. Details: http://api.jquery.com/change/
精彩评论