Look Fiddle , to see how it works.
$(".popup-content").hide();
$(".popup-title").click(function(){
$(this).toggleClass("active").next().slideToggle(0);
return false;
});
$(".popup-content .close-this").click(function(){
$(".popup-title", $(this).parents(".popup-box")).click();
return false;
});
That way, the class activewill be set when tight coupling is also used.
You can also have a lot .popup-boxon the same page.
source
share