html
<input type="text" class="required" />
now i want to select all the text-box with this given class name and want to check whether particular text box has another class called “error” which i am adding dynamically.
$(".required).each(function() {
if(this.hasClass('error'){
alert("has error class");
}
}
but not working as expected.. how to do it?
you have a typo a missing
"and also you need to wrapthisas the jQuery object