How can you ensure that some code executes only when a class active appears on an element?
active
$('.active').then()
$('.element').attr('class', 'active')
$('.element').hasClass('active')
$('.element').with('.active')