animated message footer and click

by SHELDON PASCIAK

HTML

// TODO convert into my own message popup library<BR />
// myMSG = require('./myMSG.js');<BR />
// myMSG.show(x,y,animationtype,message,pause,speed, etc);<BR />

<div id="footer" class='footer'>Click Me</div>

CSS

.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    cursor: pointer;
}





/* For the demo only */
#content {
    background: #D0E5FF;
    padding: 20px;
    color: #00214B;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 14px;
    line-height: 1.8;
}
.footer {
    background: #0070FF;
    line-height: 2;
    text-align: center;
    color: #042E64;
    font-size: 30px;
    font-family: sans-serif;
    font-weight: bold;
    text-shadow: 0 1px 0 #84BAFF;
    box-shadow: 0 0 15px #00214B
}

JavaScript

$('#footer').click(function() {



  $( "#footer" ).animate({
    opacity: 0.25,
    //left: "+=50",
    height: "toggle"
  }, 250, function() {
  
    // Animation complete.
    
    $('#footer').html("Thanks");
    
      $( "#footer" ).animate({
        opacity: 1,
        //left: "+=50",
        height: "toggle"
      }, 250, function() {
        // Animation complete.
      });   
    
  });


});

      $( "#footer" ).animate({
        opacity: 1,
        //left: "+=50",
        height: "100%"
      }, 1000, function() {
        // Animation complete.
      });