Jquery 选择框键盘导航
I am busy with a selectbox in a template but i can't get it solved.
If you go to this page click here and look for the selectbox (it's in the forms section) and use the keyboard navigation it's skips some options and i don't know why?!
Can someone help me with this one?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题似乎出在 sbCustomSelect 插件中。只要您在页面上启动一次它就可以正常工作(您可以将其应用于多个元素,它们只需要位于一个选择器下)。
像这样启动两次:
将使跳跃发生,如下所示:http://jsfiddle。 net/niklasvh/Qker9/7/
您可以通过将它们组合成一个选择器并仅初始化插件一次来获得相同的功能:
并且该插件工作正常:
http://jsfiddle.net/niklasvh/Qker9/8/
The problem seems to be in that sbCustomSelect plugin. It works fine as long as you initiate it once on the page (you can have it applied on multiple elements, they just need to be under one single selector).
Initiating it twice like this:
Will make the jumping occur, like can be seen here: http://jsfiddle.net/niklasvh/Qker9/7/
You can get the same functionality by combining them into one single selector and initializing the plugin only once:
And the plugin works fine:
http://jsfiddle.net/niklasvh/Qker9/8/