I am stuck on trying to add a simple scale effect on group elements inside an SVG. By hovering over a list item a group element from the SVG should scale-up, however, when doing so it will lose its position in the element since it is using translate.
Any idea on how to tackle this or how I should approach this.
List markup is as follow:
li.active {
color: red;
}
.round {
transition: transform .3 ease;
}
.round.active {
transform: scale(1.3)
}
<ul class="list">
<li data-number="round1">round 1</li>
<li data-number="round1-copy">round 2</li>
</ul>
jQuery markup:
$('.list > li').on('mouseover', function() {
var _this = $(this),
dataNumber = _this.data('number');
_this.addClass('active');
$('#' + dataNumber).addClass('active')
});
$('.list > li').on('mouseleave', function() {
$(this).removeClass('active');
$('.round.active').removeClass('active')
});
A fiddle was set up here.
Any help is much appreciated :)