Hello,
I have a question about jQuery and Css Selectors...
My HTML is:
- <div id="rev_slider_3_1">
- <ul style="Something">
- <li style="Something">
- <div class="slotholder">
- <div class="tp-bgimg defaultimg" style="background-color: for example blue"></div>
- </div>
- </li>
- <li style="Something">
- <div class="slotholder">
- <div class="tp-bgimg defaultimg" style="background-color: for example red"></div>
- </div>
- </li>
- ...(A few more li's)
- </ul>
- </div>
I want to change the div's (tp-bgimg or defaultimg) background color using jQuerys .css method...
I also want to have the background colors alternating ....
So I first tried to change the bg-color for one div...
by using this code:
- jQuery(".tp-bgimg").css("background-color","red");
But it does not have any effect.... :(
the div I want to change is the div with sliders content in it (bg-image is slider image)...
I hope someone could help me..
Best regards
Dave