I am working with java and js. Query is I am adding div dynamically from java code and it is getting displayed on the jsp but I want onclick event on that div id. And its not working
tried this:
$("#moreoption" ).on( "click", function() {
alert( "Goodbye!" ); // jQuery 1.3+
});
//added class instead of id and in a href
$(".moreoption" ).on( "click",'a', function() {
alert( "Goodbye!" ); // jQuery 1.3+
});
$("#dd" ).live( "click", function() {
alert( "Goodbye!" ); // jQuery 1.3+
});
Please help.