Right now I'm trying to add an animation to a div when I press a button. However, I'm not sure on how to trigger a custom animation on button click with JavaScript or jQuery. As of now I do not have any JavaScript written for this.
Im very new to this, hence me asking the pro's!
HTML:
<div class="container" id="frontPage">
<div "container">
<h1 class="header center green-text">ABOUT</h1>
<div class="row center">
<p class="header col s12 light">Something here</p>
</div>
</div>
<div class="row center padding-bottom-1">
<a a href="{{ url('/loginpage') }}" class="btn-small green" id="loginButton">login</a>
<a class="btn-small green">apply</a>
</div>
</div>
CSS:
#frontPage {
text-align: center;
margin-top: 80px;
position: relative;
animation-name: slideOutLeft;
animation-duration: 1s;
animation-fill-mode: forwards;
width: 500px;
}
@keyframes slideOutLeft {
0% {left: 0;}
100% {left: -1500px;}
}