views:

77

answers:

4

Anyone know why?

Here's the JS:

$(".screenshots .tab1").hover(function() {
    $(".section1").addClass("test");
        }, function() {
    $(".section1").removeClass("test");
        });
    });

And the CSS:

.test {
    background: black;
    border: 1px solid #ffb75b;
    background-color: #fffadb;
    } 
A: 

Try specifying background once:

.test {
    border: 1px solid #ffb75b;
    background-color: #fffadb;
}
Darin Dimitrov
+3  A: 

Maybe there is a css entry that overrules yours. Try this:

background-color: #fffadb !important;
IgalSt
you were right, thanks.
Walker
Happy to help. Please accept the answer.. :)
IgalSt
+1  A: 

Maybe it is just a copy and paste error but you have a }); to much. Should be:

$(".screenshots .tab1").hover(function() {
    $(".section1").addClass("test");
}, function() {
    $(".section1").removeClass("test");
});

See a live example: http://jsfiddle.net/wmD4E/

Of course background: black will have no effect because background-color: #fffadb; overwrites it.

Felix Kling
+1  A: 

I think it is because you have an extra }); at the end of your JS code. see working example here http://jsbin.com/adeye4/edit

Daveo