That's interesting stuff. Adobe accomplishes a nice focus with their accordion SPRY control so I just figured that the best JS framework on the planet (jQuery) might have a work around.
Could a click to the body tag accept all clicks except one through a certain DIV? -----Original Message----- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Stephan Beal Sent: Tuesday, August 14, 2007 4:05 PM To: jQuery (English) Subject: [jQuery] Re: focus with DIVs On Aug 15, 12:46 am, "Mitchell Waite" <[EMAIL PROTECTED]> wrote: > Is there a way to use focus with a div rather than just an input element? Focus, by definition, applies only to elements which can accept input. Focus is in fact short for "input focus." > If there is not how would you handle it so when a container gains or losses > focus some visual effect occurs (like its background becomes gray). Since focus can only happen on input elements, any such feature would require significant kludges. According to selfhtml.de, the following elements can accept onfocus: JavaScript allows: <body> <frame> <input> <layer> <select> <textarea> HTML 4.0 allows: <a> <area> <button> <input> <label> <select> <textarea> Source: http://de.selfhtml.org/javascript/sprache/eventhandler.htm#onfocus