# When I click on a button, an svg animation needs to start?

**URL:** <https://forum.kirupa.com/t/when-i-click-on-a-button-an-svg-animation-needs-to-start/638902>\
**Category:** web dev\
**Created:** [November 3, 2018, 6:13pm UTC](https://forum.kirupa.com/t/when-i-click-on-a-button-an-svg-animation-needs-to-start/638902 "2018-11-03T18:13:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![11134](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/11134/32/9343_2.png) [@11134](https://forum.kirupa.com/u/11134)\
**Post date:** [November 3, 2018, 6:13pm UTC](https://forum.kirupa.com/t/when-i-click-on-a-button-an-svg-animation-needs-to-start/638902/1 "2018-11-03T18:13:53Z")

</div>

Hello,from Bulgaria,i have a problem which bugs me really hard,i have a img tag with an svg in it and,i tried with a pseudo class active in css, to show that svg animation after i click on a button but it doesn`t work,i don`t know much JS but i would like to do it with it ,so it wont`t brake in other browsers.Please help if you had have the same issue…  
Here is my code:

```
<button id="click">welcome</button>

<div class="me-first"
<img src="pic/me-there.svg>
</div>
```

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [November 4, 2018, 5:50pm UTC](https://forum.kirupa.com/t/when-i-click-on-a-button-an-svg-animation-needs-to-start/638902/2 "2018-11-04T17:50:20Z")

</div>

Where is the animation defined? Is it defined inside the SVG file? Or are you trying to animate the image element?
