Highlight container on field focus
Hi,
I'd like to highlight the field container when the field is focused, just like wufoo does. Sample wufoo form can be previewed here:
http://tinyurl.com/6rfebn
Although they provide the javascript publicly, but I want to do it with jQuery. I understand it can be done by adding/removing classes, using something like:
-
$("fieldname").click(function(){
$("input.class").removeClass("xshown").addClass("xhidden");
$(this).addClass("yshown");
});
...but that would create too many functions I guess. I'd like to keep it as short as possible.
Many thanks.