jquery – how do I not change the background color of header row of dynamic table on hover
I have a dynamic table that is being built with jquery and am using the .on
See fiddle example that shows the header row bg color does change on hover.
http://jsfiddle.net/remy/sCGRL/
$(document).on({
mouseenter: function () {
$(this).css("background-color", "lightgoldenrodyellow");
},
mouseleave: function () {
$(this).css("background-color", "");
}
}, "#PersonOrgTBL tr");
You can also write it like:
fiddle demo