We nest our form inputs into unordered lists and use jquery to
highlight the parent list item of the active input:
$(function()
{
$("ul.form").find("input,select,textarea,option,.file")
.focus
(
function()
{
$(this).parents('li').addClass('ShowGuidelines');
}
)
.blur
(
function()
{
$(this).parents('li').removeClass('ShowGuidelines');
}
);
});
One interesting problem which we're facing is that, when selecting a
select box, rather than bring down the list of options, it simply
focuses on the select box and we then need to click again to bring the
list down (i.e. 2 clicks needed instead of one!)
If the addClass is replace with css(etc.), it works fine.
Anyone have any idea what's going on???
Thanks