<html>
<head>
<script src="../../ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
function alertMe() {
alert("Hello World!");
}
$(document).ready(function(){
$("p").click(alertMe);
$("button").click(function(){
$("p").unbind("click", alertMe);
});
});
</script>
</head>
<body>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<p>Click any p element to trigger an alert box.</p>
<button>Remove the alert box function from the click event for the p elements</button>
</body>
<!-- Mirrored from www.w3schools.com/jquery/tryit.asp?filename=tryjquery_event_unbind_func by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:14:04 GMT -->
</html>