I've got this dom:
<a class='foundTag' id=261 href=''>
<span class=name>wimbledon<\/span>
<span class=subscribers>(0)<\/span>
<span class=threads>(0)<\/span>
<\/a>
<a id=263 href=''>
<span class=name>wini<\/span>
<span class=subscribers>(0)<\/span>
<span class=threads>(0)<\/span>
<\/a>
It's 2 links, the first one with class='foundTag'
(the spans are inside the links). I want to select the next tag and alert its id. I used:
alert($('a.foundTag').next().attr('id'));
but it didn't work. Do you guys know why?
UPDATE: sorry guys...my bad..the first link was not a sibling to the second one. so next() wouldnt work. i had to use parent().next().children(':first') instead.
should we close this thread?