JQuery.Chosen:是否存在“模糊"提示?事件? [英] JQuery.Chosen: Is there a "blur" event?
本文介绍了JQuery.Chosen:是否存在“模糊"提示?事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
根据文档,不会发生模糊"(失去焦点)事件由选择修改的选择列表.我曾尝试jQuery的
According the documentation, there is no "blur" (losing focus) event for a select list modified by Chosen. I have tried jquery's $("#myselect").blur()
but that does not seem to fire either when the Chosen-modified select list loses focus.
请参阅: http://jsfiddle.net/q3g3pnb2/
请注意,当第一个选择列表失去焦点时,不会触发模糊事件.使用选择时,还有另一种捕获模糊事件的方法吗?
Note the blur event is not triggered when the first select list loses focus. Is there another way to capture the blur event when using Chosen?
推荐答案
如果在选择值更改时尝试运行某些事件,则可以执行以下操作:
If you are trying run some event when the select value change, you can do:
$('.my_select_box').on('change', function(evt, params) {
do_something(evt, params);
});
As you can see here in the documentation
这篇关于JQuery.Chosen:是否存在“模糊"提示?事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文