I have a simple click event using a function on
:
$('#listnav li').on({
click: function(event) {
console.log('hello world')
},
mouseover: function(event) {
}
});
This works for ul list with id "listnav". But when I add new entries to ul using the jQuery function append
, this function is not called on the newly added list items. How can i fix this?
source
share