Add an outline and background to text inputs when they are given focus. Does not work with jQuery 1.2 at the moment, only 1.0 and 1.1)
This plugin is available for download via jQuery SVN
$("input.text, textarea.text").focusFields()$("input.text, textarea.text").focusFields("#f0f")$("input.text, textarea.text").focusFields(null, 6)$("input.text, textarea.text").focusFields(null, null, "#00f", "#0ff")Click one of the examples above then click one of the fields below:
If the fields aren't given a border, they will get an inset one if a background colour is applied via the plugin. So to prevent this from happening, you could simple have this in your stylesheet. Also, Opera applies a tranparent background, so you may want to add a white background as well.
input.text, textarea.text {
border: 1px solid #000;
background: #fff;
}
And apply the class 'text' to any elements this plugin is applied to.