Javascript examples for jQuery Method and Property:event.delegateTarget
Show that delegateTarget and currentTarget are equal for directly bound events
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").on("click", function(event){ console.log("delegateTarget returns: " + event.delegateTarget.nodeName + "\ncurrentTarget returns: " + event.currentTarget.nodeName); });// w ww . j a v a2s .c om }); </script> </head> <body> <button>test</button> </body> </html>