|
-
January 12th, 2009, 10:53 AM
#1
JavaScript: Making color lighter
HTML Code:
<label for="biz_name">Bussines name</label>
Color and all other properties for label element have been set in external CSS file.
Minimizing markup!
I need a JS script, which will:
a) get activated / triggered when label element is being hovered.
b) obtain a color of label element.
c) make that color lighter, of that label element (no matter what color is in question)
Color is hex!
Ipsens
-
January 12th, 2009, 11:42 AM
#2
Re: JavaScript: Making color lighter
What's so hard about this? All you will be doing is using the onmouseover and onmouseout events mixed with a custom JavaScript function. In that function, use parseInt(x, 16) to work with the hexadecimal numbers.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
January 16th, 2009, 11:00 AM
#3
Re: JavaScript: Making color lighter
Problem is that I don't know, "how much" should I add or subtract from current color, to make it lighter
Ipsens
-
January 16th, 2009, 02:33 PM
#4
Re: JavaScript: Making color lighter
Any amount you add will make it lighter. Just play around with the amount until you get results you like.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
January 16th, 2009, 02:39 PM
#5
Re: JavaScript: Making color lighter
Ok, thanks!
Ipsens
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|