Fiddle link: http://jsfiddle.net/cN2mp/
$(document).ready(function() {
$("#next").click(function() {
$(".slideshow-inner").nextAll("div.item").addClass(".active");
$(".item.active").css({display: "block"});
});
});
Why is my code not working as expected? It should add the ".active" class to existing classes and then display the newly found ".item.class". However, it seems to be failing to add the new class. Any suggestions on how to fix this issue?