Angular: Empty Fiddle

http://angularjs.org/

HTML

<div class="error-content">You have some error...</div>

<button id="showError">Show/Hide Error</button>

CSS

body {
  background: white;
}

div.error-content {
  transition: all 0.5s linear;
  width: 100%;
  height: 70px;
  line-height: 70px;
  background-color:red;
  text-align: center;
  color:white;
  top:-70px;
  position:absolute;
}

div.error-content.active {
  top:0px
}

#showError {
  position: absolute;
 top: 80px; 
}

JavaScript

document.getElementById("showError").addEventListener("click", function() {

var className = document.getElementsByClassName('error-content')[0].className 
document.getElementsByClassName('error-content')[0].className = className.concat(" active");
setTimeout(function() {
document.getElementsByClassName('error-content')[0].className = 'error-content'
},2000)
});