How do I stop the blink??
The following code is meant to highlight the LI that the user is in within a form:
- $("input,textarea,select").focus(function () {
$(this).parents("li").addClass("focus");
});
$("input,textarea,select").blur(function () {
$(this).parents("li").removeClass("focus");
});
So far this is fitting the needs, except that when I have multiple radio buttons within an LI it blinks each time I click on a different radio button. How do I fix this so that it can 'remember' if the previously focused form control was in the same LI so that it won't remove/add the class and cause said blink?