AOS (Animate On Scroll) Library Not Working in D2L - why?

Answers
-
Hi Brock!
Are there any errors visible in the browser console? To bring up the browser console (e.g in Chrome) press F12 to display the developer tools, reload your testing page in Brightspace and look to the console for any output:
-
Hi Brock - after chatting with some internal colleagues - they provided a bit more information on this inquiry. Content topics are displayed in an iFrame in Brightspace. Animations can't be triggered as the page in the iFrame is displayed at full height and the scrollbar is at the top level parent page. The issue is that an HTML page for the the topic is displayed at it's full height in the iFrame.
Hope that helps!
Kind regards, Bruce
-
Nice tip! I'll take a look and will let you know - thanks for the suggestion!
-
Fantastic! I suspected something to this effect, but have read a few workarounds on Stack Overflow. I will investigate and follow up if I have any additional comments or solutions.
Thanks!
-
@Brock Parks Dear Brock,
Did you find a work-around to trigger AOS in the D2L Brightspace environment?
Kind regards,
Arman
-
@Brock Parks @Arman Vinck Try using find & replace in the JavaScript file to change window.AddEventListener to window.parent.AddEventListener (4 occurrences), window.pageYOffset to window.parent.pageYOffset (1 occurrence), and window.innerHeight to window.parent.innerHeight (2 occurrences).
I'm still using the CSS from the CDN, but uploaded my own JS file and it appears to be working for me within D2L. I tried it in Safari, Edge, Chrome and Firefox, as well as in the Pulse app on my Android phone. Firefox on PC is the only one that didn't do the animation when the object was in the viewport on page load. But all of the others appeared to be working.
Here's a (somewhat choppy) gif of me scrolling down the page in my test course:
-
Thanks, Jennifer! We will try this over the next few days and will let you know what we experience - looks great!
-
@Arman Vinck Thanks for the prompt, Arman - we never found a solution and since it wasn't a dealbreaker, we hadn't circled back - I will update here in the next few days once I also try out Jennifer's solution...
Categories
- All Categories
- 6 Thought Leadership
- 7 Known and Fixed Issues
- 6 Product Roadmap
- 553 Archived
- 10 Accessibility
- 28 Community Corner
- 2 Welcome
- Updates
- Member Spotlights
- 4 Events
- 242 Development
- 746 Customer Enablement
- Evaluate - Assess Student Learning
- Get Comfortable with Brightspace
- Communicate - Engage with Your Students
- 1 Create - Set up your Brightspace course
- Action - Add or create student activities
- 26 Partners
- 8 Product News
- 2022
- 2022 Release Notes
- 2021 Release Notes
- 4 Training
- andycat