6

I tried to run the following code :

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

I get the error :

Syntax error, unrecognized expression: unsupported pseudo: focusable

I am using jquery-1.9.1.What is the reason? Is there any other way to find all the focusable elements in a div?

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
user584263
  • 375
  • 5
  • 18

1 Answers1

15

This seems not to be part of jQuery, but of jQuery UI: https://github.com/jquery/jquery-ui/blob/44b2180782df6ef3324789324fcf3f98b85784a0/ui/jquery.ui.core.js#L93

Update: I've extracted this code into a small jquery "plugin", see: https://gist.github.com/njam/7974250

njam
  • 1,233
  • 14
  • 16