title: jquery select from inserted html
body: <p>having trouble selecting from inserted modal html. dispatchBody won't' select or insert</p>
  
  <pre><code>success: function (response) {
          var result = omac.getJson(response);
   if (result.status.msg == "Success.") {var html = '&lt;div class=\"modal right fade\" id=\"referenceModel\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\"&gt;    &lt;div class=\"modal-dialog\" role=\"document\"&gt;        &lt;div class=\"modal-content\"&gt;            &lt;div class=\"modal-header\" style=\"background-color: #428bca;color:#fff;\"&gt;                &lt;button type=\"button\" class=\"close\" id=\"btnCloseModel\" data-dismiss=\"modal\" aria-label=\"Close\"&gt;&lt;span aria-hidden=\"true\"&gt;&amp;times;&lt;\/span&gt;&lt;\/button&gt;                &lt;h4 class=\"modal-title\" id=\"myModalLabel\"&gt;Reference Center&lt;\/h4&gt;            &lt;\/div&gt;                &lt;div class=\"modal-body dispatchBody\"&gt;  &lt;\/div&gt; &lt;div class=\"modal-footer\"&gt;      &lt;button type=\"button\" class=\"btn btn-primary\" data-dismiss=\"modal\"&gt;CLOSE&lt;\/button&gt;&lt;\/div&gt;&lt;\/div&gt;&lt;\/div&gt;&lt;\/div&gt;';
  $(html).after(".mainBody");
              $('.dispatchBody').html(result.results.html);
          }}
  </code></pre>