Custom Glossary Button

Oct 20, 2020

Hey everyone,

I want to use a custom Glossary button but not seeing a simple trigger to use to access the Glossary.  Is this possible to do?  I do not want to use the Glossary button that can be added in the "player properties".  Do I need to run JavaScript to make this happen?  If so can someone please share ideas?  

 

Thanks!!!

9 Replies
OWEN HOLT

Untested but I think the JavaScript for the modern player (SL360) would look something like the following:

//to display the glossary using JavaScript
document.getElementById("glossary-link").setAttribute("aria-expanded", "true");
document.getElementById("glossary-panel").style.display = "block";

//to collapse the glossary using JavaScript
document.getElementById("glossary-link").setAttribute("aria-expanded", "false");
document.getElementById("glossary-panel").style.display = "none";