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
Post a Comment