When I dynamically add a class to an element, pseudo filtering doesn't recognize that class. This problem occurs when I use on() function, but everything is fine when I use live()
At the beginning, all list items are clickable. But after you press the button, "Ipsum" should not be clickable any more, and should not appear another "Not active" message.
$('.item:not(.active)').on('click', function(){
$('<p>Not active</p>').appendTo('body');
});