Forum Discussion
JavaScript Tricks for Articulate Storyline 3/360 show/hide menu
Has anyone got the show/hide menu to work here on the Elearning Brothers website?
I've tried attaching the code to a button but nothing seems to happen
Thanks
44 Replies
- AndyHeckmanCommunity Member
Has anyone managed to get this to work in the modern player?
- JerryBeaucaireCommunity Member
For me in the Modern player, when I use
$('.area-secondary').animate ({
width: 'toggle', opacity: 'toggle'
});the text in the side menu bar fades away, but the menu bar doesn't actually close/minimize.
- ZsoltOlahSuper Hero
You can try this method to toggle the menu in the modern player:
https://www.rabbitoreg.com/examples/p99/#/lessons/a2XRT-5gHOwbWDNMCfBnrbTKF5fmgvqi
Basically, it's using jQuery to trigger a click on the menu button.
- RagesCCommunity Member
Thanks for the quick response.
Anyway to toggle the menu (top menu) in the Storyline 3?
- Louis-Daniel642Community Member
I have the same issue, and you can use $('.area-secondary').toggle() to get the same result.
- RagesCCommunity Member
Hi,
Is it possible to change the menu position to top right when we use this script?
- LeeWebberCommunity Member
Many thanks @Mark Cairns this works perfectly in Storyline 360!
- AlxSanchez-2a8bCommunity Member
Hi,
I have included a storyline file below that shows how to toggle the Glossary tab and it shows its content. I was able to do so given all the information presented here.
The breakthrough for me was Mark Cairns’ answer to Phil Mayor. I also looked at Zsolt Olah's site https://www.rabbitoreg.com/examples/p99/#/
Enjoy! - JenTan-789b6490Community Member
Does anyone know how I can toggle the Notes tab (in the top bar, not the side bar). I've tried Mark Cairns' and Alx Sanchez's approaches, and while they worked for toggling the menu in the sidebar, I had no luck with the tabs in the top bar. The trigger I used was
$('.transcript-link').click()
. Is there something I'm missing? - MarkCairnsCommunity Member
I'm having the same problem showing the Notes or the Resources tab content via jquery. If anyone has figured this out please post here. Thanks!
- MathNotermans-9Community Member
Instead of relying on jQuery it can be easier to use Vanilla Javascript instead...
As this is Allen's code for it:
$( " .menu-icon-wrapper " ).click();
$( " .glossary-tab " ).click();
$( " .view-content " ).click();
removing and changing the jQuery ( $ ) for plain Vanilla Javascript is like this:
document.querySelector("#hamburger > div").click();
document.querySelector("#glossary-tab").click();
document.querySelector("#play-pause > div").click();
If you need other elements in Storyline to show/hide...use the inspector to find its proper selector - JonasSeemann-f1Community Member
This works perfect for me:
document.querySelector('.menu-icon-wrapper').click();
I think they removed jQuery.
- MathNotermans-9Community Member
JQuery has been removed quite a while ago. Either add it yourself or use Vanille Javascript without jQuery.