Q:

Retrieving an attribute from the next associated class

Hey folks, diving into jQuery and loving it. I have a set of links ex:
<a href="#" title="Link 1" class="links">First Link</a>
<a href="#" title="Link 2" class="links">Second Link</a>

and also have a function that alerts the user what the link title is when they click on one:
$(".links").click(function(){
    var a_link = $(this);
    alert((a_link.attr("title"));
});

Now, how would I also alert the user what the next title in the associated class is? I tried using next() in a few formats but can't figure it out.
Thanks a lot for the help.

A:

like this?
$(".links").click(function(){

    var a_link = $(this);
    alert(a_link.attr("title"));

    var a_next_link = a_link.next();
    alert(a_next_link.attr("title"));

});

