【问题标题】:Jquery unsupported pseudo: focusableJquery不支持的伪:可聚焦
【发布时间】:2013-11-04 06:09:12
【问题描述】:

我尝试运行以下代码:

focusables = container.find(":focusable"); where container is a div.

我得到了错误:

Syntax error, unrecognized expression: unsupported pseudo: focusable

我用的是jquery-1.9.1,请问是什么原因?有没有其他方法可以在 div 中找到所有可聚焦的元素?

【问题讨论】:

  • 你也在用jquery ui吗?

标签: javascript jquery jquery-selectors focusable


【解决方案1】:

这似乎不是 jQuery 的一部分,而是 jQuery UI 的一部分: https://github.com/jquery/jquery-ui/blob/44b2180782df6ef3324789324fcf3f98b85784a0/ui/jquery.ui.core.js#L93

更新: 我已将此代码提取到一个小的 jquery“插件”中,请参阅: https://gist.github.com/njam/7974250

【讨论】:

    猜你喜欢
    • 2018-03-18
    • 1970-01-01
    • 1970-01-01
    • 2012-08-07
    • 2021-12-02
    • 1970-01-01
    • 2017-12-08
    • 2022-08-22
    相关资源
    最近更新 更多