Pager twig can't access to my javascript file

by maelg18   Last Updated March 14, 2019 17:07 PM - source

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?


Related Questions

Views pagination, jquery and ajax error

Updated July 24, 2016 08:03 AM

Find item position in the pager

Updated April 05, 2015 16:03 PM

pager style customization

Updated February 28, 2017 07:07 AM