I have this weird issue where an svg is resizing on hover in safari. I'm using jquery's hover to replace an svg on a page with a slightly different svg. This work's properly in all browsers except safari which for some reason completely resizes the svg on mouseover and mouseout.
My svg's height is set in the css
img.svg-graphic {
height: 180px;
}
And displayed on the page as an image
<div class="container">
<img class="svg-graphic" src="svg-icons/version1.svg">
</div>
When I hover over the container, I swap out the svg with another, and then return to the default when I hover off.
$('.container').hover(function() {
$('.svg-graphic').attr('src', 'svg-icons/version2.svg');
}, function() {
$('.svg-graphic').attr('src', 'svg-icons/version1.svg');
});
Any ideas on what could be causing safari to completely ignore the sizing?