I use a simple jQuery code to filter DIVs with given class. It is based on the method given [here](https://stackoverflow.com/questions/5017836/javascript-show-hide-as-filters-to-list-of-divs), and working demo is [here](http://jsfiddle.net/pJRek/1/)

```
$(document).ready(function(){
    var links = $('.bound');
    var divs = $('div');
    links.click(function(event){
       divs.hide();
       divs.filter('.' + event.target.id).show();
    });
});

```

This works when the DIVs are originally in the html code; but I call DIVs from an external file via simple jQuery ajax.

```
$.ajax({
  type: 'POST',
  url: 'external.html', 
  success: function(html){
  $("#results").append(html);
  }
});

```

How to mix these two simple jQuery codes to work together to filter DIVs provided by ajax?