JavaScript SlideUp effect with jQuery slideup effects in jquery,slideup in jquery,slideup() in jquery,

I'm currently working on my website footer and would like it if the user clicks Contact Us that a yellow div appears from behind the footer.

Here is what I'm working on so far right now, but I can't seem to position the yellow box hidden behind the footer. The yellow area will be roughly 300px in height when visible.

var clicked=true;
$(".one").on('click', function(){
    if(clicked)
    {
        clicked=false;
        $(".two").css({"top": 0});
    }
    else
    {
        clicked=true;
        $(".two").css({"top": "40px"});
    }
});
footer {
  width:100%;
  display:block;
  background:#ccc;
  position:fixed;
  bottom:0;
  left:0
}

.container {
    overflow:hidden;
    height: 60px;
    float:left;
}
.one {
    position: relative;
    bottom: 0;
    background-color: lightblue;
    z-index: 1;
    cursor:pointer;
    overflow: hidden;
    height: 40px;
}
.two {
    position: relative;
    bottom: 40px;
    background-color: yellow;
    z-index: -1;
    -webkit-transition: top 1s;
    -moz-transition: top 1s;
    -o-transition: top 1s;
    transition: top 1s;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<div class="container">
    <div class="two">I slide!<br>And I am higher than the div before me...</div>
</div>

<footer>
  <ul>
  <li><a target='_blank' href="">Privacy Policy</a></li>
  <li><a target='_blank' href="#" class="one">Contact Us</a></li>
  </ul>
</footer>
Answer:1

Try this one. It uses jQuery animate to slide.

http://jsfiddle.net/armqc25a/

JS

var clicked=true;
$(".one").on('click', function(){
    if(clicked)
    {
        clicked=false;
        $(".container").animate({"bottom": "0px"});
    }
    else
    {
        clicked=true;
        $(".container").animate({"bottom": "40px"});
    }
});

CSS

footer {
  width:100%;
  background:#ccc;
  position: fixed;
  bottom:0;
  height: 40px;
  left:0;
  z-index: 1000;
}

.container {
    overflow:hidden;
    height: 40px;
    position: absolute;
    bottom:0;
    width: 100%;
    z-index: 1;
}
.one {
    position: relative;
    background-color: lightblue;
    cursor:pointer;
}
.two {
    position: relative;
    background-color: yellow;
    -webkit-transition: top 1s;
    -moz-transition: top 1s;
    -o-transition: top 1s;
    transition: top 1s;
}
Answer:2

AngularJS $scope.model is undefined when I initialize it via Javascript <button ngf-select="upload($file)">Выбрать</button> <span id="photoSpan"></span> ...

AngularJS $scope.model is undefined when I initialize it via Javascript <button ngf-select="upload($file)">Выбрать</button> <span id="photoSpan"></span> ...

  1. angularjs scope model
  2. angularjs scope ng-model
  3. angularjs scope contains the model data

It seems it's fairly common practice to grab the contents of a Google-calendar embed code, and add a stylesheet into it (either manually or through something like a PHP script) and display a custom-...

It seems it's fairly common practice to grab the contents of a Google-calendar embed code, and add a stylesheet into it (either manually or through something like a PHP script) and display a custom-...

  1. what are these google pop ups
  2. what are these google charges

I have a date_select in my html form. I know that it separates the day month and year. I am trying to work out how to construct a date in the form YYYY-MM-DD within my Javascript, in order to send ...

I have a date_select in my html form. I know that it separates the day month and year. I am trying to work out how to construct a date in the form YYYY-MM-DD within my Javascript, in order to send ...

As part of an image gallery I am using the below code to switch out the src attribute on an image element as a user clicks on various thumbnails. Every part of it has been working fine for about 7 ...

As part of an image gallery I am using the below code to switch out the src attribute on an image element as a user clicks on various thumbnails. Every part of it has been working fine for about 7 ...

  1. attribute change doesn't work