Page 1 of 1

Scripts

Posted: Tue Jun 25, 2024 2:54 am
by scap
Looking for inspiration - what scripts are you using on your sites, and to achieve what functionality?

Re: Scripts

Posted: Tue Jun 25, 2024 11:21 pm
by andrewb
We use a few different scripts. Some turn up in each topic, others are used for specific topics.
Our specific ones:
  • Some custom scripts that let users filter divs on a page to search for specific videos or to find a particular type of video. The search works as the user types a search term to display videos that use that term. The video type script uses some buttons to display groups of related videos.
  • And another that we add to the help sites for our unsupported versions that displays a popup modal to direct people to the latest version of the help or let them stay on the older version. This uses cookies to check if they have already made a choice, so the popup isn't triggered on each page they visit.
Our common scripts:
  • We have a script that adds a back-to-top button that displays when the users scroll down the page.
  • Another script checks the user's browser settings to automatically display Vimeo video captions that match the browser language.
We also have a range of scripts we use in our eLearning outputs to compensate for some of the shortcomings of MadCap's rather mediocre eLearning feature. There is also a variation of the div filtering script (that also uses cookies like our unsupported version script) that we use to display content related to one of four specific sectors that users can choose to view for one of our eLearning tutorials.