简体   繁体   中英

JQuery slideDown() not working

I cant get the greenbar to slidedown when the page loads. Can anyone tell me what's wrong with my code?

HTML

<html>
<head>
<title>
Live Green Plants
</title>

<link rel="stylesheet" type="text/css" href="home.css">
<script src="home.js"></script>

</head>

<body>

<div class="headerBar">
<img src="headerBar.png" width="657" height="34" alt=""/>
</div>
<script type="text/javascript" src="Script/jquery-1.9.2.min.js"></script>
<script type="text/javascript" src="Script/jquery-ui-1.8.18.min.js"></script>




</script>
</body>
</html>

Javascript

$(document).ready(function(){
    $('.headerBar').slideDown('slow');
});

它需要从不可见开始,使用style="display:none"查看它的实际效果: http : //jsfiddle.net/jas6H/5/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM