I currently have something like this:
$(".jtable tbody td").not(".DeleteLicense").hover(
How can I use delegate with this? Something like
$("#resultContainer,#approvalContainer,#createNewContainer").delegate(".jtable tbody td....
Thanks!
You can use the :not() selector to move the negation in to your selector.
$("#resultContainer,#approvalContainer,#createNewContainer")
.delegate(".jtable tbody td:not(.DeleteLicense)", "...", ...);
Note that the jQuery documentation recommends using the .not() function rather than the :not() selector in most cases, but I'm not sure if it is possible in this case.
If you're willing to use another approach, you may find that you could use the .jtable tbody td selector in your call to delegate, and then use if(!$(this).is(".DeleteLicense")) { ... } in your event handler to only process elements that meet your criteria.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With