How to set background color of td
in jQuery?
e.g $(this).css({**BackgroundColor:Red**})
Thanks
original title: "css - How to set background color in jquery"
How to set background color of td
in jQuery?
e.g $(this).css({**BackgroundColor:Red**})
Thanks
Wie setze ich die Hintergrundfarbe von td in jQuery? zB $ (this) .css ({** BackgroundColor: Red **}) Danke
Dies ist die Zusammenfassung nach der Übersetzung. Wenn Sie die vollständige Übersetzung anzeigen möchten, klicken Sie auf das Symbol "Übersetzen"
You actually got it. Just forgot some quotes.
or
You don't need to pass over a map/object to set only one property. You can just put pass it as string. Note that if passing an object you cannot use a
-
. All CSS properties which have such a character are mapped with capital letters.Reference: .css()
How about this:
Related post: Add background color and border to table row on hover using jquery
Try this for multiple CSS styles:
You can add your attribute on callback function ({key} , speed.callback, like is