.parents().removeClass() not working
i got this javascript, trying to remove a class on a parent element: $(this).parents(".box").removeClass("expanded"); on this html: <div class="box trx"> <a href="javascript:;" class="open-content"><?php the_post_thumbnail('thumbnail'); ?></a> <div class="expandable"> <?php the_content(); ?> <span class="simple"> <a class="cunload" href="javascript:;">Close</a> </span> </div> </div> Unfortunately, this doesn't work so far. I've done several tests like: $(this).parents(".box").removeClass("trx"); and $(this).parents(".box").addClass("exd"); It all works. I'm using jQuery 1.6.2 and jQuery