scripts.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * @file
  3. * A JavaScript file for the theme.
  4. *
  5. * In order for this JavaScript to be loaded on pages, see the instructions in
  6. * the README.txt next to this file.
  7. */
  8. // JavaScript should be made compatible with libraries other than jQuery by
  9. // wrapping it with an "anonymous closure". See:
  10. // - https://drupal.org/node/1446420
  11. // - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth
  12. (function (Drupal, $) {
  13. 'use strict';
  14. // To understand behaviors, see https://www.drupal.org/node/2269515
  15. Drupal.behaviors.basic = {
  16. attach: function (context, settings) {
  17. // Execute code once the DOM is ready. $(handler) not required
  18. // within Drupal.behaviors.
  19. $(window).on('load', function () {
  20. // Execute code once the window is fully loaded.
  21. });
  22. $(window).on('resize', function () {
  23. // Execute code when the window is resized.
  24. });
  25. $(window).on('scroll', function () {
  26. // Execute code when the window scrolls.
  27. });
  28. }
  29. };
  30. })(Drupal, jQuery);