I want to do some operations after click on row, except td with class='someClass'
$('#mainTable tr td:not([class=someClass])')开发者_StackOverflow社区.unbind().live('click',function ()
{
//some operation
});
what is wrong?
note: this td is not last td in table.
Maybe I'm missing something here but can't you just...
$('#mainTable tr td').not('.someClass').click(function(){
//some operation
});
Have you looked into using hasClass?
If you leave the click event bound then on the td click event check
$(this).hasClass("SomeClass");
The article probably explains how to use it better than I could
精彩评论