function yourfunction() { $(".selectrow").click(function(){ alert("HIT!"); (Something goes here to get the row id) }); }