This example uses JQuery to set the background-color of input text boxes, and attaches the focus/blur events to those text boxes with a "required" class.
- Add JQuerify bookmarklet to this page. (Get JQuerify here)
- $("input:text").css("background-color", "yellow");
- $("input:text.required").focus(hilite); $("input:text.required").blur(unlite);
a textbox | a required textbox |
function hilite() {
$(this).css("background-color", "red");
}
function unlite() {
$(this).css("background-color", "yellow");
}
No comments:
Post a Comment