I use like the following. What I want to do is when i move the mouse, the top div block slide in, but if I do it like above, the slidein is ok, but cannot control the progress. I mean when i refresh the page, even i did not move the mouse, and the top nav block automatically slide in..what is the matter. Thanks for reply..

 <style>

body,h1,hr,ul,input,* {
     padding: 0;
     margin: 0;
     font-family: helvetica, arial, sans-serif;

     color:#748188;
     font-size:12px
}

#nav
{
    width: 560px;
    position: relative;

    padding: 5px 0;
    height: 15px;

    margin: -26px auto 0 auto;

}

#nav li {
    list-style-type: none;
    float: left;
    margin: 0 32px 0 0;

}

</style>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
jQuery.noConflict();

jQuery(document).bind("mousemove",function(e){

jQuery("ul#nav").animate({marginTop:"0"},"fast","linear","");

});
</script>   

</head>
<body>
<div id="navholder">
  <ul id="nav" class="pwidth">
    <li><a id="nvhome" class="active" href="/">??</a></li>
    <li><a id="nvnews" href="/news/">????</a></li>
    <li><a id="nvabout" href="/about/">????</a></li>
    <li><a id="nvfaq" href="/faq/">??</a></li>

  </ul>
  <hr/>
</div>

</body>   

1 answer

0
points

Works for me when I use the version 1.6.1

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>

Answered over 5 years ago by Eric (BookOfZeus)