Jquery & Getting CSS
Jquery & Getting CSS
So this issue is new to me. And pretty familiar with Jquery.
Just curious why this works:
- $("div#footer a").css('color');
But these do not:
- $("div#content a").css('color');
- $("div#side1 a").css('color');
- $("div#side2 a").css('color');
CSS:
- div#content {
- background-color: #FFFFFF;
- color: #000000;
- margin: 0 200px 0 25%;
- }
- div#content p {
- line-height:1.4;
- }
- div#content a {
- color: #3ece26;
- }
- div#content a:hover {
- text-decoration: none;
- }
- div#side1 {
- background-color:#B9CAFF;
- color: #000000;
- float:left;
- width:200px;
- margin-left:-200px;
- }
- div#side1 a {
- color: #ffffff;
- }
- div#side1 a:hover {
- text-decoration: none;
- }
- div#side2 {
- background-color:#FF8539;
- color: #000000;
- float:left;
- width:25%;
- }
- div#side2 a {
- color: #ffffff;
- }
- div#side2 a:hover {
- text-decoration: none;
- }
- div#footer {
- clear:left;
- width:100%;
- background-color: #333;
- color: #FFF;
- }
- div#footer p {
- margin:0;
- padding:5px 10px;
- }
- div#footer a {
- color: #FF8539;
- }
- div#footer a:hover {
- text-decoration: none;
- }
Just boggles my mind how it can grab the footer link color, but no others. Am I missing something here?
All other elements I go to grab (background-color, text color) all work fine. Just not when trying to get the link color. And only able to grab footer link color. ARG!! -_-