javascript - detect certain value in style attribute and change it -


i thought following code work needs

$("td[style='background-color: #ffbbbb']").css('background-color', '#333');

but problem facing each td has different values within style attribute instance:

font-weight: normal;background-color:#ffbbbb; , code above doesn't seem execute since there multiple values. how can account this?

essentially want change elements background color of #ffbbbb color.

try utilizing attribute contains selector [name*="value"]

$("td[style*=#ffbbbb]").css("background-color", "#333"); 

Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -