Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <head> <script src="../../ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $("body").on("click", "button", function(event){ alert("delegateTarget returns: " + event.delegateTarget.nodeName + "\ncurrentTarget returns: " + event.currentTarget.nodeName); }); }); </script> </head> <body> <button>Show the difference between delegateTarget and currentTarget when delegation occurs</button> </body> </html>
Result:
W3Schools.com - Try it yourself