Answers for "jquery each has class"

0

jquery each has class

$('li').each(function (){
    if($(this).hasClass("active")){
      $(this).css("color", "red");
    }
    else{
      $(this).css("color", "blue");
    }
  });
Posted by: Guest on June-04-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language