3 * Defines Javascript behaviors for the tocify module.
6 (function ($, Drupal, drupalSettings) {
10 Drupal.behaviors.nodeDetailsSummaries = {
11 attach: function (context) {
12 $(".table-of-contents").once().each(function(index) {
14 theme: $(this).attr('data-theme'),
15 context: $(this).attr('data-context'),
16 selectors: $(this).attr('data-selectors'),
17 showAndHide: $(this).attr('data-show-and-hide'),
18 showEffect: $(this).attr('data-show-effect'),
19 showEffectSpeed: $(this).attr('data-show-effect-speed'),
20 hideEffect: $(this).attr('data-hide-effect'),
21 hideEffectSpeed: $(this).attr('data-hide-effect-speed'),
22 smoothScroll: $(this).attr('data-smooth-scroll'),
23 scrollTo: $(this).attr('data-scroll-to'),
24 showAndHideOnScroll: $(this).attr('data-show-and-hide-on-scroll'),
25 highlightOnScroll: $(this).attr('data-highlight-on-scroll'),
26 highlightOffset: $(this).attr('data-highlight-offset'),
27 extendPage: $(this).attr('data-extend-page'),
28 extendPageOffset: $(this).attr('data-extend-page-offset'),
29 history: $(this).attr('data-history'),
30 hashGenerator: $(this).attr('data-hash-generator'),
31 highlightDefault: $(this).attr('data-highlight-default'),
32 ignoreSelector: $(this).attr('data-ignore-selector'),
33 scrollHistory: $(this).attr('data-scroll-history')
35 .css('overflow', 'auto')
36 .css('height', '80%');
41 })(jQuery, Drupal, drupalSettings);