Saturday, August 7, 2010

jQuery - Get the element ID value of a clicked item

This is small tip that I found useful when completing a new project. As usual with jQuery everything is simple as 1 2 3

$('.clsname').click(function(){
     var idval = this.id;
});

1 comment: