hasclass each jquery code example
Example: jquery each has class
$('li').each(function (){
if($(this).hasClass("active")){
$(this).css("color", "red");
}
else{
$(this).css("color", "blue");
}
});
$('li').each(function (){
if($(this).hasClass("active")){
$(this).css("color", "red");
}
else{
$(this).css("color", "blue");
}
});