I am trying to flip an SVG arrow when I click on it but somehow it is not working:
HTML:
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="10px" height="6px" viewBox="0 0 10 6" enable-background="new 0 0 10 6" xml:space="preserve">
<g>
<polygon fill="#000" points="5,6 0,2 0,0 5,4 10,0 10,2 "/>
</g>
</svg>
JS:
$('#arrow').click(function(){
$(this).attr('transform', 'scale(-1 1) translate(-200 0)');
});
JSfiddle: http://jsfiddle.net/Gue3P/
What am I doing wrong?
Many thanks