I have one very interesting question (for me :) )..
I'm using jquery and I want to find in HTML the first tag after my reference one .
For example my HTML :
<a href="#" class="A" >A</a>
<table>
.....
</table>
<a href="#" class="B" >A</a>
<table>
.....
</table>
<a href="#" class="c" >A</a>
<table>
.....
</table>
I want to select the first table after <a href="#" class="A" >A</a>, the first table after <a href="#" class="B" >B</a> ... with jquery . Because just this link is reference tag for me in HTML , all tables are the same (don't have any class, ID ...) , and I don't know how many table can be :( ..
Thanks !!!
Use next:
$('a').click( function() {
var tbl = $(this).next('table'); // find the next table element following the clicked link
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With