Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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'); });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jQuery #onclick #working
ADD COMMENT
Topic
Name
4+8 =