Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Oct 2010
    Posts
    272
    Thanks
    8
    Thanked 1 Time in 1 Post

    Having issues with Jquery slideDown()

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

    HTML
    Code:
    <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
    Code:
    
    
    $(document).ready(function(){
        $('.headerBar').slideDown('slow');
    });

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,696
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    It needs to be hidden initially. Make it $('.headerBar').hide().slideDown('slow');


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •