I'm still kind of a newbie at Jquery, I'm trying to change a text color if it detects the text color code changed to #28a745
and I can't get it to work.
The button is just an example for on the event of color change, the color change can come from anything like class events,....
$("#change").on("click", function() {
$("#remember-me").css("color", "#28a745");
});
if ($('#remember-me').css("color") == "#28a745"){
$("#remember-me").css("color", "#495C83");
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<button id="change">change</button>
<div id="remember-me">some text</div>
Hope someone can help me!