title: Need help selecting an element from a jquery response
body: <p>I am trying to get the value of a hidden input element from a jquery ajax response. The default value for the hidden element is  0. But after the jquery post has been completed the hidden input value attribute gets changed to a different number(by php) </p>
  
  <p>For some reason when I select the element from the data var (the response variable) and pass it into the html() function, it shows the value as 0 for the hidden input</p>
  
  <p>Below is my code...</p>
  
  <pre><code>       $.post(url,obj_param)
  
  
             .done(function (data) {
  
                 console.log(data);
  
                 var thread_id = $("#thread").html(data);
  
                 console.log(thread_id);
  
  
  
             });
  
       }
  </code></pre>
  
  <p>Here is a snippet of my html code</p>
  
  <pre><code>&lt;section class="message_form"&gt;
      &lt;form action="http://localhost/GuruCoders/index.php/messages/NewMessageThread/index" class='msg_form' id='59' method="post" accept-charset="utf-8"&gt;
      &lt;div id="err_msg"&gt; Please enter a message to send &lt;/div&gt;
  
      &lt;textarea name="msg" class="msg" id="59" cols="30" rows="10"&gt;&lt;/textarea&gt;
      &lt;br&gt;
      &lt;input type="submit" name="send" value="Send"&gt;
      &lt;/form&gt;
  
  
     &lt;!-- The value returns as 0 not 55 --&gt;
      &lt;input type="hidden" id="thread" value="55" name="thread"/&gt;
  &lt;/section&gt;
  </code></pre>