Click here to Skip to main content
15,896,493 members
Please Sign up or sign in to vote.
2.33/5 (2 votes)
Hello All,

I am little new to Jquery, I have search net for my solution but havent got anything.

In JQuery I need to check what is the font-color of label.

I m working on .aspx page.
Posted

1 solution

HTML code :

<label for="lblColor" id="lblColor" style="color:blue"> Label Color </label>


JQuery Code :

C#
var lblColor = $('#lblColor').css('color');
document.write(lblColor);



OUT PUT :

rgb(0, 0, 255)


You can Test above on JsFiddler (Click Run Button) : http://jsfiddle.net/mM2XW/67/[^]

I hope this will help to You.
 
Share this answer
 
Comments
salah9 8-Jul-13 4:55am    
thnks...it really worked
Sampath Lokuge 8-Jul-13 5:03am    
@salah9 Glad to hear that it helped!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900