var slides = $(".promo-slide");
slides.each(function(key, value){
if (key == 1) {
this.addClass("first");
}
});
Why do I get an error saying:
Uncaught TypeError: Object #<HTMLDivElement> has no method 'addClass'
From the above code?
See Question&Answers more detail:os