jQuery dropdownchecklist 控件中 onChange 或 onBlur 的替代方案
当前使用此处找到的 jquery dropdownchecklist: http://dropdown-check-list.googlecode.com/ svn/trunk/src/demo.html
我正在使用许多下拉列表对客户端上的大量数据进行一些相当繁重的处理。本质上,简单地说,随着每个下拉列表的更改,每个下拉列表中的数据都会被过滤。我正在使用 onChange 事件来执行此操作,但是随着我所做的每个选择(我能够进行多个选择),事件都会被触发,这是预期的,但我发现它确实减慢了我的应用程序的速度。我宁愿在下拉列表折叠起来时触发事件。我尝试过使用 onBlur 事件,但是当包含选项的 div 折叠起来时,只有当整个控件失去焦点时,才会发生这种情况。
有谁知道我可以使用一个事件,或者这个控件可以让我的函数在崩溃时触发,而不是在它改变或失去焦点时触发?
如果没有,添加该功能有多容易呢?
Currently using the jquery dropdownchecklist found here:
http://dropdown-check-list.googlecode.com/svn/trunk/src/demo.html
I'm doing some pretty heavy processing of a large quantity of data on the client with a number of dropdownlists. Essentially, and put very simply, as each dropdown changes the data in each is filtered. I'm using the onChange event to do this but with each selection I make (I am able to make multiple selections) the event is fired, which is expected but I'm finding it's really slowing up my app. I'd much rather have the event fire when the dropdownchecklist collapses back up. I've tried using the onBlur event but this isn't happening when the div that contains the options collapses back up, only when the whole control loses focus.
Does anyone know of an event that I can use or that this control has that I can hook into to have my function fire when it collapses rather than when it changes or loses focus?
If not, how easy is it to add the functionality too it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我玩得很快,并成功绑定到原始选择控件的模糊事件。您提到的插件在失去焦点时会触发该事件。
您是否也按照上述类似的方式进行操作?你能发布一些代码吗?
I had a quick play and I managed to bind successfully to the blur event of the original select control. The plugin you mentioned triggers that event when it loses focus.
Are you doing it in a similar way to the above? Can you post some code?