0

i have several CSS classes with different background and i want to change the classes if the backgroundcolor body is for example equals to #fc4477

2
  • (if body background == *****) body addclass ***** ? Commented Jun 20, 2016 at 14:45
  • i try to explain better (sorry for my terrible english) i'd like to dynamically change the background url image of a div in response of the color change of an HTML element selected by the user.. If the user hypothetically select for the text logo color #Fc4477 my logo-image change from 'logo1.png' to 'logo2.png' Commented Jun 20, 2016 at 14:57

1 Answer 1

1

You can use the jQuery function .css()

and get the value of processed css rule, match with your value ad do what you need

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.