Forum Discussion
MathNotermans-9
10 months agoCommunity Member
Using classnames as Selector instead of acc-name
The upcoming Advanced Javascript API gives you the option to select an element by getting its ObjectID. Although this works fine and for sure has pluses above using the accessibility name ( especiall...
MathNotermans-9
10 months agoCommunity Member
As said the sample from above added here. It will work fine in the current Storyline, BETA access not needed. WAAPI as is, is pure free MDN code ( https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Web_Animations_API_Concepts ) so available in any browser.
Alas its far less developed then GSAP for example...but as you can see in the sample added you can easily mix-and-match the 2.
Only actual difference between this one and the same in the BETA version is that you can quickly select the elements in the Javascript editor to get the ObjectID.
Main lines to notice in the code are these:
visibleStorylineElements[i].classList.add(...accClasses); //adds all classes to visible Storyline elements
var icons = document.getElementsByClassName("Asset");// now you can select by ClassHappy animating...
Related Content
- 11 months ago
- 4 years ago
- 3 years ago