title: how can i find closest span?
body: <p>let's say i am having fallowing html structure- </p>
  
  <pre><code>&lt;div data-theme="a" class="ui-btn ui-btn-icon-right ui-btn-corner-all ui-shadow ui-btn-up-a"&gt;
      &lt;span class="ui-btn-inner ui-btn-corner-all"&gt;
          &lt;span class="ui-btn-text"&gt;Select One&lt;/span&gt;
          &lt;span class="ui-icon ui-icon-arrow-d ui-icon-shadow"&gt;
          &lt;/span&gt;
      &lt;/span&gt;
      &lt;select onchange="selectState(this,'ADDR_SHIP_STATE')" id="ADDR_SHIP_STATE" name="ADDR_SHIP_STATE"&gt; 
          &lt;option&gt;Hi&lt;/option&gt;
          &lt;option&gt;Hello&lt;/option&gt;
          &lt;option&gt;How&lt;/option&gt;
          &lt;option&gt;are&lt;/option&gt;
          &lt;option&gt;you&lt;/option&gt;
      &lt;/select&gt;   
  &lt;/div&gt;  
  </code></pre>
  
  <p>what i am trying to do is on change of select box, take the text of selected option and place it inside span(replace <code>select one</code> with this data) having class name <code>ui-btn-text</code></p>
  
  <p>below is the code which i ahve tried so for without any luck  </p>
  
  <pre><code>function selectState(id,stateId){
  var selectedState = $("#"+stateId+" option:selected").text();
  $(id).closest("ui-btn-text").text(selectedState);
  }
  </code></pre>
  
  <p>Please suggest me how can i do this..</p>