madelinelise
2/21/2020 - 2:45 PM

Jquery after page loads

!((document, Drupal, $) => {
  'use strict';

  /**
   * Store the video in a data-src attribute
   * until the page has finished loading.
   */
  Drupal.behaviors.heroVideo = {
    attach: function(context) {
      $(window).bind('load', function() {
        console.log('I should be number 2?');
      });

      console.log('I should be number 1');
    }
  };
})(document, Drupal, jQuery);