Hi folks, I started working with jQuery for the first time yesterday- and I've got something that I'm hoping you all may be able to help me figure out.
I would think that this (simple?) bit of code would 1) find all the <a> tags with class "addcomment", and then 2)assign an onClick that would create an alert box displaying the class of the containing block. But the second to last line with the alert doesnt seem to be working. Any help is appreciated. Thanks, Matt $("a").filter(".addcomment").click(function() { alert($(this).parent.attr('class')); });