document on click in javascript code example Example: document on click $(document).on("click","#test-element",function() { alert("click"); });