title: Jeditable setting default selected value after change
body: <p>My app allows the user to update a field via a drop down box using jeditable. When the program is loaded i created this function to get the selected value and set it as the selected value in jeditable.</p>
  
  <p>But after i change the value, the selected tag stays set as the old value. how can i make it change to the new value?</p>
  
  <p>this is the function</p>
  
  <pre><code>function updateType(ID,type){
  $(document).ready(function(){
  
      $('#tweekType-'+ID).editable("edit.php?type=tweekType", {  
  
      data   : " {'copywriting':'Copywriting','design':'Design','code':'Code', 'selected':'"+type+"'}",
      type   : 'select'
  
      });
  });
  </code></pre>
  
  <p>this is the wrapper around the tag.</p>
  
  <pre><code>&lt;span id="tweekType-&lt;?php echo $getTweaksReturned-&gt;tweekID; ?&gt;"&gt;
  &lt;?php type($getTweaksReturned-&gt;type); ?&gt;
  &lt;script&gt;updateType('&lt;?php echo $getTweaksReturned-&gt;tweekID; ?&gt;','&lt;? echo $getTweaksReturned-&gt;type; ?&gt;'); &lt;/script&gt;
  &lt;/span&gt; 
  </code></pre>
  
  <p>The same tag is replicated on the page the returns the new variable.</p>