I am trying to create an accordion with jquery. Now I have reached a problem and that is can“t figure out how to enlarge the image of the separate slide. If the first article is clicked it works, but when you click the next article the image of the first stays in the enlarged size. Here is my jquery code:
$(document).ready(function() {
$(function () {
$(".news").siblings("span").click(function () {
$(".news").slideUp(200, function() {
$(this).siblings(".news").toggle(500);
});
$(this).siblings(".news").toggle(500);
$('#test').addClass('article').siblings('#headline').removeClass('article');
});
});
});
Here is my entire code DEMO. Hopefully someone can help me.