Forums

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

Home Forums CSS Help with else statement

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #45783
    ScottMarshall
    Participant

    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.
    $(“#MainContainer”).animate({
    top:’0px’
    });
    //Change the height of the main container to 80px.
    $(“#MainContainer”).css(‘height’,’80px’);
    //Change the padding on the navigation lists to 29px.
    $(“.Navigation li”).css(‘padding-top’,’29px’);
    }

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.