trouble overriding Slideshow JS / improvement proposal

Created on 31 August 2022, about 2 years ago
Updated 27 June 2024, 5 months ago

I am trying to override this library in my theme:

w3css-paragraphs-slideshow:
version: VERSION
  js:
    js/w3css-paragraphs-slideshow.js: { }

I tried in my theme.info

libraries-override:
  w3css-paragraphs-slideshow:
    js:
      js/w3css-paragraphs-slideshow.js: js/w3css-paragraphs-slideshow.js

I also tried a few other variants, also adding w3css-paragraphs in front, using w3css-paragraphs-slideshow/w3css-paragraphs-slideshow, underscores, etc. but no luck yet, I have difficulties wrapping my head around library structure (btw is there a way to inspect all libraries for a page?), so I would appreciate help :)

improvement proposal:
the need to override the JS stems from modifications I made to the slideshow template.
the JS uses selectors such as '.w3-slideshow-inner>.w3-s-np>.w3-s-next' so any change of structure between these classes will make JS override necessary.
=> I would suggest using IDs or unique classes for navigation links, so that the JS would remain a somewhat resistant to template changes.

πŸ’¬ Support request
Status

Fixed

Version

1.0

Component

Miscellaneous

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024