[ad_1]
I believe there are several problems. First of all, I believe you want to write the display:none
CSS logic this way:
.inner-card.active{
display: none;
}
This means that the inner card will be hidden if it also has the active
class.
Secondly, I believe you need to rewrite the script this way:
$(document).ready( function(){
$('.card').click( function() {
$(this).find(".inner-card").toggleClass('active');
});
});
When you use the toggleClass
you need to use just the name of the class, not the selector (-> no dot). Also, from the CSS, it looks like you need to find the inner card element first.
[ad_2]