appears you are using 2 different css attributes. 'background' and 'background-color'

try changing style to:

.content .division .category.selected {
background-color: red;
}
or see what happens in jQuery with
.css
("background");

John wrote:
Hi,

I used jQuery 1.3.2 and Firefox for the following html

<html>
<head>
<style type="text/css">
.content .division .category.selected {
background: red;
}

</style>
</head>
<body>

<div class="categories">
<div class="content">
<div class="body">
       <ul id="category-list">
               <li class="division">
                       <ul>
                       <li class="category selected">
                               <div class="title">
                                       <a href="" class="category-
suv">SUVs (6)</a>
                               </div>

                       </li>

                           <li class="category category_69564">
                               <div class="title">
                                       <a href="" class="category-
general">4x4 (6)</a>
                               </div>

                       </li>
                       <li class="category category_73293">
                               <div class="title">
                                       <a href=""
class="category-hybrid">Hybrid</a>
                               </div>
                       </li>
              </ul>
               </li>
    </ul>
</div>
</div>
</div>

</body>
</html>

I used the following css command to get back the background color:

$("#category-list > li.division:eq(0) ul > li:eq(0) a").css
("background-color");

but it always returned the value "transparent" instead of the "red"
color rgb(255,0,0).
I also tried "backgroundColor" and it did not work either
("transparent"). How to get back
the correct background color?

Thanks in advance,

John

  

Reply via email to