css()[
^] is a jQuery method that works on jQuery selectors, so
instead of :
element.css("background-color","red");
You have to turn it into a jQuery selector:
$(element).css("background-color","red");
In your last example, the $(this) refers to the currently selected object in an event which in your case is the "tr" that is being hovered over.
Learn more about
jQuery Selectors[
^]