- 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
over 1 year 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.