1(function ($, Drupal) { 2 // Foundation-Init (ersetzt foundation_init.js vom Base-Theme, 3 // das durch zurb_foundation_disable_base_js deaktiviert ist) 4 Drupal.behaviors.foundationInit = { 5 attach: function (context) { 6 $(context).foundation(); 7 }, 8 }; 9 10 $(function () { 11 var ANCHOR_ID = "anchorheadermenu"; 12 13 function appendAnchorOnce(selector, logLabel) { 14 var $target = $(selector).first(); 15 if (!$target.length) return; 16 // Ensure we only add the anchor once per page to avoid duplicate IDs 17 if (document.getElementById(ANCHOR_ID)) return; 18 $target.append('<a id="' + ANCHOR_ID + '"></a>'); 19 // if (logLabel) console.log(logLabel); 20 } 21 22 appendAnchorOnce(".slick--optionset--slider", "Slider"); 23 appendAnchorOnce(".slick--optionset--branchenlosung", "Slider Branche"); 24 appendAnchorOnce(".slick--optionset--slider-produkt", "Slider Produkt"); 25 appendAnchorOnce(".wiki-header", "Wiki"); 26 }); 27 28 // if ($(".grid-container.breadcrumbs-wrapper.page-nodeslider").length) { 29 // $(this).append('<a id="anchorheadermenu"></a>'); 30 // console.log("Bradcrumbs"); 31 // } 32 33 if ($(".accordion").length) { 34 $(".accordion .accordion-item:first").addClass("is-active"); 35 $(".accordion").foundation(); 36 } 37 38 // } 39 40 // Equalizer erneut anstossen, sobald Slick sein Layout gesetzt hat. 41 // 42 // Beim ersten $(context).foundation() liegen die Slick-Slides noch 43 // untereinander. Equalizer wertet das als "stacked", setzt height:auto und 44 // bricht ab (_reflow -> _isStacked). Slick baut danach horizontal um, aber 45 // kein resize/mutate-Event stoesst den Equalizer erneut an - die Spalten 46 // bleiben unterschiedlich hoch. 47 $(window).on("load", function () { 48 $("[data-equalizer]").each(function () { 49 var plugin = $(this).data("zfPlugin"); 50 if (plugin && typeof plugin._reflow === "function") { 51 plugin._reflow(); 52 } 53 }); 54 }); 55})(jQuery, Drupal);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.