Commit 280301a7 authored by Chris Snyder's avatar Chris Snyder Committed by Samuel Mortenson
Browse files

Issue #2833798 by chrissnyder, bygeoffthompson, HongPong, serg2: Foundation's...

Issue #2833798 by chrissnyder, bygeoffthompson, HongPong, serg2: Foundation's JS not applied to elements loaded after page load
parent 0418d468
Loading
Loading
Loading
Loading
+17
Changes for js/foundation_init.js: 17 added lines, 0 removed lines.
Original line number Diff line number Diff line
/**
 * @file
 * Initializes foundation's JavaScript.
 *
 */
(function ($, Drupal) {

  /**
   * Initializes foundation's JavaScript for new content added to the page.
   */
  Drupal.behaviors.foundationInit = {
    attach: function (context, settings) {
      $(context).foundation();
    }
  };

})(jQuery, Drupal);
−5
Changes for templates/html.html.twig: 0 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -49,10 +49,5 @@ db_offline ? 'db-offline',
  {{ page }}
  {{ page_bottom }}
  <js-bottom-placeholder token="{{ placeholder_token|raw }}">
  <script>
    (function ($) {
      $(document).foundation();
    })(jQuery);
  </script>
  </body>
</html>
+1
Changes for zurb_foundation.libraries.yml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ global:
      css/zurb_foundation.css: {}
  js:
    js/foundation.min.js: {}
    js/foundation_init.js: {}
    js/top_bar_active.js: {}
    js/motion-ui.min.js: {}
  dependencies: