[jQuery] .next() -- huh?
[jQuery] .next() -- huh?
hi,
should be simple to say what's wrong ... well -
alert() works, but alerts nothing / empty ... something like 'MOO!' or
'BETA!' would
be great -- what's wrong with code?
--------------
$("#nav div").hover(function(){alert($
(this).next('span').text());},function(){});
--------------
<div id="nav">
<div>
<span>MOO!</span>
<ul> <li>foo</li> <li>bar</li> </ul>
</div>
<div>
<span>BETA!</span>
<ul> <li>hello< /li> <li>world</li> </ul>
</div>
...
</div>