Issue on Adding Class to Element which already Had same Class
I am trying to add an animation class to on div by using at This Demo following code and repeating the result on each time click as:
- $(document).ready(function(){
$("#1").on("click",function(){
$('#layer1').addClass('animated fadeInLeft');
// $('#layer1').removeClass('animated fadeInLeft');
});
$("#2").on("click",function(){
$('#layer1').addClass('animated fadeInLeft');
});
});
but it it seems the process is happeining only one time and I am not able to add the classes animated fadeInLeft even from another call. I also tried to use
- $('#layer1').removeClass('animated fadeInLeft');
after each time adding class but it didn't work either. Can you please let me know how I can reset the animation after each time animate?
Thanks