jquery - How to load a transition without :hover -


if @ example below, css transition comes life when hovering on it. how can achieve effect without having hover on mouse? want able use jquery add class under circumstances , when that, css transition should triggered. need change? thanks

.hvr-bounce-to-right {    display: inline-block;    vertical-align: middle;    -webkit-transform: translatez(0);    transform: translatez(0);    box-shadow: 0 0 1px rgba(0, 0, 0, 0);    -webkit-backface-visibility: hidden;    backface-visibility: hidden;    -moz-osx-font-smoothing: grayscale;    position: relative;    -webkit-transition-property: color;    transition-property: color;    -webkit-transition-duration: 0.5s;    transition-duration: 0.5s;  }  .hvr-bounce-to-right:before {    content: "";    position: absolute;    z-index: -1;    top: 0;    left: 0;    right: 0;    bottom: 0;    background: #2098d1;    -webkit-transform: scalex(0);    transform: scalex(0);    -webkit-transform-origin: 0 50%;    transform-origin: 0 50%;    -webkit-transition-property: transform;    transition-property: transform;    -webkit-transition-duration: 0.5s;    transition-duration: 0.5s;    -webkit-transition-timing-function: ease-out;    transition-timing-function: ease-out;  }  .hvr-bounce-to-right:hover, .hvr-bounce-to-right:focus, .hvr-bounce-to-right:active {    color: white;  }  .hvr-bounce-to-right:hover:before, .hvr-bounce-to-right:focus:before, .hvr-bounce-to-right:active:before {    -webkit-transform: scalex(1);    transform: scalex(1);    -webkit-transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66);    transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66);  }
<a href="#" class="hvr-bounce-to-right">bounce right</a>

example: https://jsfiddle.net/sdkva2t6/

you can use settimeout add class element.

for example.

 .hvr-bounce-to-right{ //your style }  .hvr-bounce-to-right.new-class:before{ hover effect } 

then using java script add (new-class) using settimeout. should work


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -