I thought the following code would work for my needs
$("td[style='background-color: #FFBBBB']").css('background-color', '#333');
but the problem I am facing is that each td
has different values within the style
attribute for instance:
font-weight: normal;background-color:#FFBBBB;
and the code above doesn't seem to execute since there are multiple values. How can I account for this?
Essentially I want to change elements with the background color of #FFBBBB
to another color.
$("td[style*=#FFBBBB]").css("background-color", "#333");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.