USe JQUery Next() API to grab the data from a hidden Text Box
<p>I am doing some self-learning about JQuery and stuck over a question:<br/>
I am trying to use the JQuery next() API to grab the data from the Text Box field of Hidden type, but I failed to do so.<br/>
Here is my code:</p>

<pre><code> $(document).ready(function(){
    $(".Testing").click(function(){
    var what =  $(this).next().val();
    alert(what);
    });
 });

&lt;span class="Testing"&gt;Hello&lt;/span&gt;&lt;br/&gt;
&lt;input type="hidden" value="World"&gt;

 &lt;span class="Testing"&gt;Hi&lt;/span&gt;&lt;br/&gt;
 &lt;input type="hidden" value="There"&gt;
</code></pre>

<p>Could you help me solve the question please?</p>

<p>Reference link:
<a href="http://stackoverflow.com/questions/3223446/grab-the-id-of-a-span-tag-and-add-some-value-to-a-text-box-field-according-to-whi">http://stackoverflow.com/questions/3223446/grab-the-id-of-a-span-tag-and-add-some-value-to-a-text-box-field-according-to-whi</a></p>
