- Issue created by @Ahmad Abbad
- π§πͺBelgium weseze
Images are only loaded on page load and on scrolling. Any other system (like tabs) needs to implement a drimage delay class and JS init function to make it work.
The documenation for this can be found on the project homepage ( https://www.drupal.org/project/drimage/ β ) or in the READMe file in the drimage module.
Bascially you need to add a delay class, remove it when the tab opens and then call drimage init function on the content of the tab.tabElement.classList.remove('js-delay-drimage'); Drupal.drimage.init(tabElement);
What system for "tabs" are you using?
- π―π΄Jordan Ahmad Abbad Jordan
Thank you @weseze
I'm using Boostrap tabs
I'm trying to implement it using JS but I'm getting this error
drimage.js?s3p93u:145 Uncaught TypeError: context.querySelectorAll is not a function
any advice? - π§πͺBelgium weseze
You would have to share your code for me te provide feedback on this...
My first guess is that you are passing an empty variable to Drupal.drimage.init(yourVariable). - Status changed to Closed: outdated
7 months ago 1:34pm 22 November 2023 - π§πͺBelgium weseze
Closing because there is no more feedback. I'm assuming you resolved the issue. Feel free to reopen if there is more feedback.