CSS id选择器不起作用

Tom*_*ell 2 css jquery css-selectors

我正在尝试使用jQuery进行一些悬停操作,但我认为选择器不起作用.这是HTML:

<div id="footer">
            <ul>
                <li><a href="#">Start a Something</a></li>
                <li><a href="#">Send a Gift</a></li>
                <li><a href="#">How It Works</a></li>
                <li><a href="#">Secure Service</a></li>
                <li><a href="#">About Company</a></li>
                <li><a href="#">Blog</a></li>
                <li><a href="#">Contact</a></li>
            </ul>

            <ul>
                <li>&copy; 2012 Company</li>
                <li><a href="#">Terms of Use and Privacy</a></li>
            </ul>
        </div>
Run Code Online (Sandbox Code Playgroud)

这是jQuery:

$('#footer ul li').mouseover(function(){
        $(this).animate({
            color: "white"
        }, 200);
    }).mouseout(function(){
        $(this).animate({
            color: "#bcbdbd"
        }, 200);
});
Run Code Online (Sandbox Code Playgroud)

我应该使用什么选择器?

Nie*_*sol 5

为什么你为什么要用这个任务使用jQuery?

原始CSS!

#footer ul li a { /* or even just "#footer a" */
    color: #bcbdbd;
    transition: color 0.2s ease;
    -webkit-transition: color 0.2s ease;
    /* Chrome does not yet support the un-prefixed version */
}
#footer ul li a:hover { /* same comment as above */
    color: #fff;
}
Run Code Online (Sandbox Code Playgroud)