document.addEventListener("DOMContentLoaded", function(event) { jQuery('#My_Button a').click(function(){ alert("oi"); }); });