I am trying to add a class to the current section if the next section class has the class "card_wrapper"
This is what I have but I can't seem to get it to function correctly.
$('.main_content section').each(function(){
if($(this).closest('section').hasClass('card_wrapper')) {
//add class to current section (to style)
console.log('found section');
}
});
Aucun commentaire:
Enregistrer un commentaire