Calling a JS function on every blog article - fails

I’m struggling to get to work a simple js onclick-event on all my blog-articles. The function only applies to the first article - why?

My structure:

<?php foreach($page->children()...
<article onmouseover="hoverList()">...
</article>
<?php endforeach ?>

My script:

function hoverList() {
  var img = document.querySelector('.list-article-cover ');
  img.classList.toggle('list-img-hover')
}

Because: https://developer.mozilla.org/en-US/docs/Web/API/Element/querySelector

Thanks for the quick hint - didn’t thought of this one. :+1: