[jQuery] Find the first element outside (this)
Hello, i am having problems with finding the next element after (this)
here is the html
<tr>
<td class="one">Name</td>
<td class="input"><input type="text" /></td>
<td class="info"><span style="display:none;">the help</span></td>
</tr>
<tr>
<td class="one">Uname</td>
<td class="input"><input type="text" /></td>
<td class="info"><span style="display:none;">the help</span></td>
</tr>
i am trying to display the span element when i click the input.. here
is what i got so far:
$("input").focus(function(){
$(". info:next span").show();
});
this displays all span's. if i change the span to "span:next" it only
displays the first span.
anyone can help me with this?