$(document).on( 'click', '.classname', function () {
alert('clicked');
});
**** Another Method ****
// where #wrapper is a static element in which you add the dynamic links.
$( '#wrapper' ).on( 'click', 'a', function () { alert('clicked'); });
$(document).ready(function() {
$("#clicker").click(function () {
alert("Hello!");
$(".hide_div").hide();
});
});
//Why is this jQuery click function not working?
//You are supposed to add the javascript code in a $(document).ready(function() {});
$(document).ready(function() {
$("#clicker").click(function () {
alert("Hello!");
$(".hide_div").hide();
});
});