showing results for - "how do i make and animation start on click in js"
Fabio
12 May 2018
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5<style type="text/css">
6.classname {
7  -webkit-animation-name: cssAnimation;
8  -webkit-animation-duration:3s;
9  -webkit-animation-iteration-count: 1;
10  -webkit-animation-timing-function: ease;
11  -webkit-animation-fill-mode: forwards;
12}
13@-webkit-keyframes cssAnimation {
14  from {
15    -webkit-transform: rotate(0deg) scale(1) skew(0deg) translate(100px);
16  }
17  to {
18    -webkit-transform: rotate(0deg) scale(2) skew(0deg) translate(100px);
19  }
20}
21</style>
22<script type="text/javascript">
23  function ani(){
24    document.getElementById('img').className ='classname';
25  }
26</script>
27<title>Untitled Document</title>
28</head>
29
30<body>
31<input name="" type="button" onclick="ani()" />
32<img id="img" src="clogo.png" width="328" height="328" />
33</body>
34</html>
queries leading to this page
css animation fast clickinganimation when click cssclick to play animation csstrigger keyframe animation on clickcss animation start on clickcss onclick animateanimation js on clickcss keyframe on click buttonhow to make on click animation css and javascriptanimation on click jsjavascript add animation to element on clickcss div animation on clickonclick apply transition cssjavascript do css animation on clickcss animate when clickedhtlm on click animationcss activate animation on clickanimation while click css add css animation to element on clickhow to trigger an animation on click in jshow to use css transtion on button clickjs click animationkeyframes js onclickanimation onclick cssclick animation javascripton button click play css animationhavascript transitions and animationshow to trigger a keyframe onclickhtml onclick trigger animationlaunch animation from a click javascriptcss animation run on clickjavascript animation in clickjavascript start css animation onclickjavascript trigger css animation on clickon click start css animationcss start animation when clickedhow to start css animation on click with javascriptonclick css animationon click animatejavascript add animation to body onclickanimate on click cssjavascript animation on clickonclick css animation pressanimation css on clickcss animation on clickhow to do css animations with jsstart anumation after click csstrigger animation on clickjs animation on clickrun css animation on clickhow to play animation on click javascripthow to make an animation happen onclick javascriptanimate on clickhwo to activate a animation on click in javascriptactivate css on clickon click css animationonclick animation javascriptanimation css onclickclick to start the animation javascriptonclick css animation with statueanimate div on click cssrun keyframes on clickon click add animations jscss javascript animation on clicktrigger css animation on clicktransition on clickcss transiion on clickhow do i make and animation start on click in jsjquery run css animation on clickfunction onclick animationcss on click animationjavascript css animation in clickstart animation on button click jsdiv click css anomationmake an animation on click html5 cssif click make animation javascriptcss animation on click javascripthow to use the click event javascript to trigger an animation on a divcss animation after clickon click play animaitonon click animation namehow to make an click animation javascripystart animation on click javascriptrun animation on click jsonly css start animation when clickedjs animation clickonclick appear slowly css animationhow can i trigger an animation onclick event in javascriptjavascript trigger animation on clickadd css animation on clickjavascript css animation on clickjavascript start css animation on clickjavascript play css animation on clickapply css animation on clickjavascript animation on clickjavascript on click animationrun animation on click javascripthow to add animation in onclick event using javascriptbegin animate after clickcss animation trigger on clickrun animation on click cssanimate link on click csshow to animate with css when i clickcss animate on clickon click animation javascripttrigger css animation on button clickjs onclick naimatejavascript click animationclick to start animation in jsjavascript transitions animationsanimation js clickhow can i have a keyframes animation start onclickhow to run css animation on clickonclick animationon click start animationcss show animation on clickhow to work an animation on click in javascriptanimated on click jsplay css animation on clickonclick animation cssplay animation on button click jsjavascript start animation on clickonclick animation to divtransition onclick cssanimation on click in cssonclick start an animaitonanimation on click cssaimate after click css onclick animationanimating object on click in cssanimation in js on clickonclick run css animationcss trigger animation on clickhow to make an onclick animation javascriptopen animation when click button jshow do i make and animation start on click in js