I need to change class on hover only for current element, probably with 'this'. Here is working code but it changes classes for all elements.
https://codepen.io/kylokean/pen/XWXeWjL
<a href="#" class="change_img_wrap">
<img src="https://cdn.iconscout.com/icon/free/png-256/google-keep-2-569459.png" class="img-regular">
<img src="https://img.icons8.com/material/4ac144/256/user-male.png" class="img-hover">
</a>
<a href="#" class="change_img_wrap">
<img src="https://cdn.iconscout.com/icon/free/png-256/google-keep-2-569459.png" class="img-regular">
<img src="https://img.icons8.com/material/4ac144/256/user-male.png" class="img-hover">
</a>
<style>
.img-hover {
display: none !important;
}
.hideme {
display: none !important;
}
.showme {
display: block !important;
}
.change_img_wrap {
display: inline-block;
}
</style>
<script>
jQuery(".change_img_wrap").hover(function() {
jQuery(".img-regular").toggleClass("hideme");
jQuery(".img-hover").toggleClass("showme");
});
</script>