I\'m trying to do something very simple. Basically I have a clickable div \'hot spot\', when you click that it fills the screen and displays some content. I achieved this by
Try this :
$('.close-button').on('click', function(){ $('.element').removeClass('grown'); $('.element').addClass('spot'); }); $('.element').on('click', function(){ $(this).removeClass('spot'); $(this).addClass('grown'); });
I hope I understood your question.