How to remove and return the width?

Want to make when you point to the stars, their width is decreased and immediately increased to the original value. So a little movie magic.
Did it with this code:
$(".people-item").hover(function () {
 var starsWidth = $('.star-ratings-css-top').width() / $('.star-ratings-css-top').parent().width() * 100;

 $(this).find( ".star-ratings-css-top" ).css("width","0%")
 $(this).find( ".star-ratings-css-top" ).animate({
 width: [ starsWidth ]
 }, {
 duration: 750,
 specialEasing: {
 width: "easeOutBounce"


But it works through time and a lot of bugs. I'm sure there are solutions better, but I can't understand them/find
July 4th 19 at 23:36
1 answer
July 4th 19 at 23:38

Find more questions by tags CSSHTMLJavaScriptjQuery