Skip to content Skip to sidebar Skip to footer

Jquery Closest() Not Working For Me (or I'm Not Working For It)

Given this jQuery: $('div.MvcFieldWrapper :input').focus(function() { $(this).closest('label.MvcDynamicFieldError').fadeOut(); }); And given this HTML:
).focus(function() { $(this).prevAll('label.MvcDynamicFieldError').fadeOut(); });

closest actually means "find the closest ancestor that matches the selector, including the already selected element if it meets the requirements."

Post a Comment for "Jquery Closest() Not Working For Me (or I'm Not Working For It)"