0

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.

4

1 回答 1

0

我不完全理解“所以填写表格的新内容具有相同的滚动窗格?”,但我相信它是无关紧要的。

您将事件绑定到所有表单输入:$('#my-form input').change(function(){ ... });

只需在处理程序中执行您需要的任何操作。详情:http ://api.jquery.com/change/

于 2011-07-29T19:19:16.900 回答