Get a free trial // Grow your CSS skills // Land your dream job

Help with else statement

  • # June 23, 2013 at 10:51 pm

    Hey guys I need some sort of else statement, basically if my navigation on page load sits at 0px I do not want to animate it.

    //If the main container sits at 300px.
    if($(“#MainContainer”).css(‘top’) == ‘300px’) {
    //Animate the main container to 0px.
    //Change the height of the main container to 80px.
    //Change the padding on the navigation lists to 29px.
    $(“.Navigation li”).css(‘padding-top’,’29px’);

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed