I want to change an element color on my page depending on the view's pagination. If i click to previous my div will be green, if i clicked on next my item will be red.
I created a view in Drupal. I charged a js librairy in a module which is placed in a directory named js in my module directory linked to my view.
After that I created my twig which contains my view. I tested it with some actions like onclick and it worked.
Unfortunately, I add a pagination in my view but the pagination can't access to this Js file. When I clicked on a page's number, nothing happenned. How can I proceed?