title: jquery how to get textbox value inside span element
body: <p>I want to get the value of textfield(only one) inside span element using jquery but couldn't.</p>
  
  <pre><code>&lt;span&gt;simple span text
  &lt;a class="remove" href="javascript:" title="Remove"&gt;x&lt;/a&gt;
  &lt;input type="hidden" name="word[ids][]" value="this is text"&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p>Jquery code associated to <em>remove class</em> of anchor tag</p>
  
  <pre><code>$(".remove").live("click", function(){
  
  alert ($(this).parent().('input:text').val()); // return undefined
  
  //i just coded below to check whether span itself is getting or not
  alert ($(this).parent().attr('tag')); // this also return undefined 
  
  if ($(this).parent().is('span'));
  alert("parent is span"); // only this works 
  
  }); 
  </code></pre>