jQuery: checkbox does not lose focus (blur) [IE]

扶醉桌前 提交于 2021-01-27 14:20:51

问题


I have a script, that lets a table row move to the top after clicking on a checkbox.

(See my question here: jQuery: move table row to first position and then back)

Now I have the problem, that after clicking on a checkbox and then on another the not checked checkbox does not blur and after clicking some more checkboxes multiple checkboxes have focus.

example:

  • click on A
  • then click on C
  • in most cases A now has focus even it is not checked

code:

http://jsfiddle.net/gguNM/2/

Please note, that I have this problem in internet explorer, not e.g. in FireFox.

What can I do to prevent multiple checkboxes (or the wrong cb) are focused?

I've already tried something like that:

$(":checkbox").click(function () { setTimeout($(":checkbox").blur(), 100); });

but it does not change anything.

来源:https://stackoverflow.com/questions/9717135/jquery-checkbox-does-not-lose-focus-blur-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!