title: Why is the val() function returning [object Object]?
body: <p>Html code: </p>
  
  <pre><code>   &lt;div data-role="popup" id="popup-activity"&gt;
          &lt;div data-role="header"&gt;
              &lt;h1&gt;Error&lt;/h1&gt;
          &lt;/div&gt;
          &lt;div data-role="content" data-theme="d" class="ui-corner-bottom ui-content"&gt;
              &lt;h3 id="error" class="ui-title"&gt;&lt;/h3&gt;  
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Jquery:</p>
  
  <pre><code> $('#error').val('Please select Activity');                     
   alert($('#error'));
   $('#popup-activity').popup("open");
  </code></pre>
  
  <p>Hi i'm new to jquery.</p>
  
  <p>I'm using jquery.mobile-1.2.0-alpha.1.js which allows popups as in the above description.
  When I open the popup the value in the error id does not show up. In fact it shows empty.
  So I've put an alert box to see its value which says [object Object].</p>
  
  <p>Does anyone know how to display the text in the popup?</p>