Description#
In order to ease the use of the theme, some javascript functions defined in the file assets/js/theme/modules/helpers.js are provided. These functions are defined globally using the file assets/js/theme/modules/helpersGlobal.js and thus can be called from every scope.
JavaScript helper functions#
Code | Description |
---|---|
closeModals(modal); | Function managing modal closing:
|
disableSmoothScroll(); | Function deactivating smooth scrolling on main content. |
enableSmoothScroll(); | Fonction activating smooth scrolling on main content. |
getFirstVisibleElement(selector); | Function getting the first visible element from a CSS selector:
|
manageDefaultCollapsibleSidebar(); | Function managing the default behavior of the sidebar:
|
manageDefaultToc(); | Function managing the default behavior of the table of contents:
|
toggleExtendMenu(force); | Function managing the extend menu of the navigation bar (only if it is displayed):
|
toggleSidebar(force, noTransition); | Function managing the sidebar behavior:
|
toggleSidebarEntry(entry, force); | Function managing the sidebar entry:
|
toggleSidebarEntries(force); | Function managing the sidebar entries:
|
toggleToc(force); | Function managing the table of contents behavior:
|