jquery delegate table rows selector
- by Jackob
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?