How to wait until a user clicks a div

How to wait until a user clicks a div
0.0 0

#1

I have a div element like so

<div id="cell">
	<!-- Do something -->
</div>

What I want to do is to wait until the user clicks on the div (and kind of pause everything until this is done). How can I do this in jQuery or JavaScript


#2

Are you at the section “JSON API’s and AJAX” of the FCC map yet?

Have you tried the “trigger Click Events with jQuery” challenge ?


#3

use $('#cell').click(function(){//do stuff here} or $('#cell').on('click', function(){//do stuff here}