How do change the images from array in js?

There is a product card and when you hover want to Osnovnoy picture alternated by timer on pictures of data-images img tag.

For example:
<img src="main image" data-images="1.jpg,2.jpg,etc.jpg,">


In this example below does not fire the timer.. Help.
function(){
$(".product__image").hover(function(){
 var image = $(this).find("img"),
 images = image.attr("data-images").split(",");

 original_src = image.attr("src");

if(images){
 var i = 0,
 max_count = images.length;

 function changeImage(){
 if(++i >= max_count){ i = 0; }
 image.attr("src", images[i]);
}

 setInterval(changeImage(), 5000);
}
 }, function(){
 var image = $(this).find("img"); 
 image.attr("src", original_src);
});
});
March 20th 20 at 11:41
1 answer
March 20th 20 at 11:43
Solution
you pass the result of calling itself and not in the function in setInterval
is it correct
setInterval(changeImage, 5000);

Find more questions by tags JavaScriptjQuery