new elements not be listener
Hi,
if the main html page contains:
- .....
- $( ".abc" ).on('click',function() {
- console.log('a');
- });
- ....
If used Ajax to get multiple buttons with a class 'abc' and added the button to my html page by .html() now the buttons are not listener and if clicked not do the console.log, because it was not available when the page loads,how to solve this?
and whats license of contents of this forum? are all codes are under public domain also from the forum?
Thanks