The click event occurs after you click and release the mouse button. For example, we might want to click a button that will pop up an alert with a message. Such code will look like this: https://raw.githubusercontent.com/finsweet/jqueryCourse/main/jquery%20events/ex4.js?actionable=true
<script>
$(document).ready(function(){
XT1
});
</script>
$(document).ready(function(){
XT1
});
</script>
Copy to clipboard
Live demo
<style>.pop-up{background-color:#5d6373; padding: 1rem;}</style><div id="minidivpage" class="example-live"><div id="popUp" class="pop-up">Gray Area</div><a id="alertButton" href="#" class="w-button">Button alert</a></div>
<script>
$(document).ready(function() {
XT1
});
</script>
$(document).ready(function() {
XT1
});
</script>
Copy to clipboard
Press the Run Demo button to execute the scripts above.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.