Pager twig can't access to my javascript file

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

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?

Thanks



Related Questions


Updated July 24, 2016 08:03 AM

Updated June 18, 2018 17:07 PM

Updated April 05, 2015 16:03 PM

Updated May 04, 2015 00:03 AM

Updated February 28, 2017 07:07 AM