Is there a way to give a div tag focus when you click on its contents? Using CSS or JQuery?
views:
33answers:
1
+1
A:
The HTML5 draft extends the tabindex attribute so that setting it to 0 or a negative number will make an element focus-able if it isn't usually so.
The usual provisos about new features in drafts having limited browser support and limited support by assistive technologies (such as screen readers) apply.
In general, if you need to be able to give the focus to a control, it is better to pick an element that is designed to accept the focus in the first place.
David Dorward
2010-08-20 19:35:13
Daily vote limit reached; come back in 4 hours.
Pekka
2010-08-20 19:36:55