title: Accessing Ajax/Dynamic checkboxes
body: <p>How do I check all checkboxes which have been returned as part of an AJAX request?</p>
  
  <p>I have a page which displays email message summaries (think gmail/yahoo/etc... inbox). Each summary has a checkbox associated with it so that my user could do any number of things with the message. At the top and bottom of the list is a "check all" option. I know how to bind delegate functions to the dynamic checkboxes, but I can't seemt to find any way to give my "Check All" button the ability to manipulate these dynamic elements. Example:</p>
  
  <pre><code>//get the list of messages
  $.ajax({
      type: "POST",
      url: "GetMessages.asmx/GetMessagePreview",
      data: "{'FolderID': '5'}",
      contentType: "application/json; charset=utf-8",
      dataType: "json",
      success: function (result) {
         //code here to create a checkbox row (checkbox, message title, etc...)
         var cbRow = '&lt;input type="checkbox" class="msg_check" ...etc... /&gt;'
         //code here to insert to a div or other container   
  }
   });
  
  $("#selectAllButton").click( function(){
     ????? This is the blank I need filled in...
  });
  </code></pre>
  
  <p>Any help would be greatly appreciated. Thank you.</p>