jquery pros - get id of element clicked
Posted: Sun Oct 28, 2007 12:32 pm
I have a list of items, that have the same class... I'd like to have a click event on that class, then get the id of the element clicked.... any idea how I would do that?
I've tried this, but no luck..
I've tried this, but no luck..
Code: Select all
$(".categoryList").click(function () {
var id = this.attr("id");
alert(id);
});