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
Yaswanth Goli
6,872 PointsAdvanced 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
Mike Bronner
16,395 PointsIn 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.
Yaswanth Goli
6,872 PointsI know that , the above post is not showing my code
Mike Bronner
16,395 PointsCheck 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. :)
Yaswanth Goli
6,872 Pointsi have made the changes , please check it