I would like to have my svg animation run when clicking an html button. I thought I could make that work by setting begin=\"click
in my animateTransform>
If you want to start the animations just do it directly via javascript and the beginElement method, no need for all that click event rigmarole. Note that I've changed the begin on the animation from click to indefinite to make it clearer what's happening.
var needle = $('#animateNeedle'),
tape = $('#animateTape');
btn = $('#muhBtn');
btn.on('click', function(){
needle[0].beginElement();
tape[0].beginElement();
});
#tape{
fill:#ED1C24;
}
#needle{
fill:#8DC63F;
}