jquery delegate table rows selector
        Posted  
        
            by Jackob
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jackob
        
        
        
        Published on 2010-05-31T08:04:47Z
        Indexed on 
            2010/05/31
            8:12 UTC
        
        
        Read the original article
        Hit count: 348
        
I have a table which may contains other inner tables (it's not possible to edit generated markup). I want to create a delegate function for row mouseenter and mouseleave which only triggers for the associated main table rows (and not inner tables rows), as following:
  $("#tableid").delegate("tr", "mouseenter mouseleave", function(e) {
    //do stuff here
  });
But with this selector it selects also the inner table rows, so how can I modify the selector to avoid selecting inner table rows?
© Stack Overflow or respective owner