[jQuery] how to get name attribute from $(this)

[jQuery] how to get name attribute from $(this)


Hi
I am trying to create a slideing menu. I have this code
$('#menu li a').click(
function() {
$(this).next().slideToggle('normal');
}
);
This is working fine but now i am trying to add the cookie plugin by
kalus into this so that it remembers which menu item was open and
which closed.
I am very new to jquery so the way i thought of doing this was.
- at Every click I will set the cookie with name of the menu item
$.cookie('the_cookie', 'value'); //value would actually be
name attribute value from <a
So how can i retrieve the value of the 'name' attribute form $(this)?
thanks for any helpt