title: can you do a jquery mobile popup on ajax response event?
body: <p>Was hoping to use the popup and I am pretty sure I am trying to use it incorrectly.  Any ideas on how this should work?  Can you use the popup in this manner?</p>
  
  
  
  <pre><code>&lt;script&gt;
  
  function onSuccess(data, status)
  {
      data = $.trim(data);
      $("#notification").text(data);
  }
  
  function onError(data, status)
  {
      data = $.trim(data);
      //$("#notification").text(data);
      $("#notification").popup(data);        }        
  
  $(document).ready(function() {
      $("#submit").click(function(){
  
          var formData = $("#callAjaxForm").serialize();
  
          $.ajax({
              type: "POST",
              url: "sendmsg.php",
              cache: false,
              data: formData,
              success: onSuccess,
              error: onError
          });
  
          return false;
      });
  });
  &lt;/script&gt;
  </code></pre>