[jQuery] Select next element ...
I have some troubles with my project. Here it is the problem:
I have an HTML like this
<a href="">click</a>
<div> xxxx </div>
<a href="">click</a>
<div> xxxx </div>
....
When I click on the link i want to change its class and toggle the
<div> below without using any ID.
I have no problem changing the link, but I can't find a way to select
the FIRST next element.
$("a").click(function () {
$(this).attr({className: "new-class"});
$(this + " + div").eq(0).toggle();
}
I though something like this would work, but it doesnt.
How can i select the first next element after my click element?
daniele