jQuery onclick not working
$(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'); });