Answers for "jquery on click on div"

3

document on click jquery

$(document).on("click", ".onClass", function () {
    //your code
    var element = $(this); // to get clicked element
});
Posted by: Guest on August-13-2021
1

jquery on click

$( "p" ).on( "click", function() {
  alert( $( this ).text() );
});
Posted by: Guest on January-19-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language