events & ajax

events & ajax

I've got a bunch of event listeners attached to various css classes, for example:

$('.whatever').click(function(){ ... });


but then I bring new content into the DOM with

$.ajax({
   type:'POST',
   url:...
   data:...
   success:function(html){
      $('#blah')
         .append(html)
   }
});


... or something along those lines.

Now in that new html are some .whatever classes that I want to react to click events the same way the others do. Is there any easy way to tell jQuery to add all existing event listeners to all new DOM elements when they are created?[/code]