Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript animate problem

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28816
    nanook
    Member

    I’m trying to animate a menu by changing the background color, however it does not seem to be working. As I have this running on my local system I am placing the code below.

    Thanks,
    Tim

    CSS:

    #header ul{margin:0; padding:0; list-style:none;}
    #header ul li{ margin:0; display:inline}
    #header ul .last{background:none}
    /*#header ul li a{background:url(../images/bg_menu.gif) top left no-repeat; color:#fff; text-decoration:none; width:126px; text-transform:uppercase; text-align:center; display:block; float:left; line-height:58px}*/
    #header ul li a{color:#fff; text-decoration:none; width:126px; text-transform:uppercase; text-align:center; display:block; float:left; line-height:58px; background-color: #660000;}

    HTML:

    <div class="main">
    <div id="header">
    <div class="menu">
    <ul id="list">
    <li class="first"><a href="index.html" class="current">Home</a></li>
    <li><a href="index-1.html">About Us</a></li>
    <li><a href="index-2.html">Mail Delivery</a></li>
    <li><a href="index-3.html">Production</a></li>
    <li class="last"><a href="index-4.html">Our Clients</a></li>
    </ul>
    </div>

    JS:

    $("#list a").hover(function () {
    $(this).animate({backgroundColor:"#ffffff"}, 800);
    });

    #74598
    nanook
    Member

    Never mind, forgive my ignorance…. a little RTFM goes a long way…..

    Tim

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.