0

I am invoking one popup window on clicking of table row.

So my code is like this...

$('.assignPanel tbody tr').on('click', function() {  // code for invoking the popup window });

The problem is here. I dont want to invoke the same popup window while clicking on other set of 'tbody tr' where I am having class name called 'noRequiredPopup'. How can i handle this situation? Help please.

Vasethvan
  • 391
  • 1
  • 4
  • 12

3 Answers3

1

Try this : use .not() to filter out the trwith class="noRequiredPopup"

$('.assignPanel tbody tr').not('.noRequiredPopup').on('click', function() {  // code for invoking the popup window });
Bhushan Kawadkar
  • 28,279
  • 5
  • 35
  • 57
1
$('.assignPanel tbody tr').on('click', function() { 
    if($(this).hasClass('TheClassName')){
        // Pupup Code
    }else
        return false;
});
M Reza Saberi
  • 7,134
  • 9
  • 47
  • 76
0

Change css selector from:

$('.assignPanel tbody tr')

to

$('.assignPanel tbody tr:not(.noRequiredPopup)')
K K
  • 17,794
  • 4
  • 30
  • 39