Reputation:
I'm trying to validate input fields when the value is empty. I want to only target input fields using a certain class. I have tried to use .hasClass("required") without any success.
I hope somebody can help.
EDIT = Should of pasted the rest.
Upvotes: 0
Views: 287
Reputation: 35409
from:
$('input').each(function() {
to:
$('input.yourclassname').each(function() {
Upvotes: 1