Add class, click next div to remove previous active class

$(function() {
$(‘.active-play’).click(function() { // when a .myDiv is clicked
$(‘.active-play’).not(this).removeClass(‘active’)
$(this).toggleClass(‘active’)
})
})

Leave a Reply

Your email address will not be published. Required fields are marked *