Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Advanced Selectors

i have used jquery ui range for styling the <input type='range'>

<div class=".input_color"> <input type="range" id="red_color"><br/> <input type="range" id="green_color"><br/> <input type="range" id="blue_color"><br/> </div>

After getting interpreted the code is changing to <div class=".input_color"> <div class="slider"><div class="progress"></div><a class="slider"></a></div> <input type="text" id="red_color"> <div class="slider"><div class="progress"></div><a class="slider"></a></div> <input type="text" id="green_color"> <div class="slider"><div class="progress"></div><a class="slider"></a></div> <input type="text" id="blue_color"> </div>

It is apply.

Now my problem is , I need to change the background-color of handle to respective color

eg : i would like to select <a> tag by using id of`<input type="range"/> and apply respective color please suggest me a selector

Thanking you in advance

4 Answers

In general, I think the following is what you are looking for: http://api.jquery.com/css/

$(selector).css(style, value);

An example:

$("#myDiv").css("background-color", "red");

This will set the background color of the HTML element <div id="myDiv"> to red.

I know that , the above post is not showing my code

Check the "Mardown Cheetsheet" link on the bottom of the page under the text box on how to properly escape code in your post. I'm sorry, I don't fully understand what you are asking in your post. Could you rephrase, and see if you can post your code? That will help, of course, as well. :)

i have made the changes , please check it