jquery selector parent on hover 1

jquery selector parent on hover

$('table').on('hover', 'td', function () {
    var selector = $('selector_in_td', $(this));
    if (selector.length > 0) {
        //Your code
    }
});

Here is what the above code is Doing:
1. When the user hovers over a td, the event handler is called.
2. The event handler checks if there is a selector in the td.
3. If there is a selector in the td, then the code in the if statement is executed.

Similar Posts