title: jquery adding elements to DOM from data (parsed) returned from server
body: <p>I am trying to pull out some HTML (a hrefs) from a long string of data returned in an AJAX call from the server and then add these to the DOM, tried following several examples on the prior answers but cannot seem to get the DOM element to be clickable though it appears to be added as a link.  So, have stepped back and trying to add one new element when clicking on another and can't get this working either - have tried in jsfiddle, basic example of code is as follows below - when clicking on the getsearchresults, the a href is displayed within the searchresults div but when clicked does not fire the .clicakable_search handler.</p>
  
  <p>HTML
  Get search results</p>
  
   results 
  
  <p>JS code</p>
  
  <pre><code>    $(document).ready(function() {
          $("#getsearchresults_id").click(function(event) {
          var aa = $('&lt;a href="#" class="clickable_search"&gt;parsed substring from the return data&lt;/a&gt;');
          $('#searchresults').append(aa);
      });
  
      $('.clickable_search').click(function(e) {
          console.log(".clickable_search");
          e.preventDefault();
          alert('anchor without a href was clicked');
      });
     });
  </code></pre>