This might be a simple question but in some cases when I dynamically create elements .on doesn't work but live works.
I know its better to use .on, but what am I doing wrong?
This works for me:
$('.btnMore').live('click', function () {
// do something
}
This doesn't work for me:
$('.btnMore').on('click', function () {
// do something
}
How can I make the .on work at all times, like .live?