Men in Black

Agent J

Agent K

Spongebob


 
$(document).ready(function(){
var menInBlack = [];
  $(".man").each(function(){
     if($(this).css("color") == "rgb(0, 0, 0)"){
        menInBlack.push($(this));
     }
  });


  $(menInBlack).each(function(){
    alert(this.text());
  });
});
Vote up this code0
  • Niteshk34

    Man, you missed the script tag around the jquery code