diff --git a/js/scroll_to_destination_anchors.js b/js/scroll_to_destination_anchors.js index ab9ee7e..4d58e60 100644 --- a/js/scroll_to_destination_anchors.js +++ b/js/scroll_to_destination_anchors.js @@ -10,7 +10,7 @@ attach: function(context, settings) { // Wait until after the window has loaded. - $(window).load(function(){ + $(window).on('load', function() { // Utility to check if a string is a valid selector. function validateSelector(a) { return /^#[a-z]{1}[a-z0-9_-]*$/i.test(a); @@ -31,7 +31,6 @@ // When a user clicks on a link that starts with a hashtag. $('a[href^="#"]', context).click(function(event) { - block-bartik-powered("click event"); // Store important values. var hrefValue = $(this).attr('href'); diff --git a/scroll_to_destination_anchors.libraries.yml b/scroll_to_destination_anchors.libraries.yml index 04d81ec..994434c 100644 --- a/scroll_to_destination_anchors.libraries.yml +++ b/scroll_to_destination_anchors.libraries.yml @@ -1,3 +1,5 @@ scroll_to_destination_anchors: js: js/scroll_to_destination_anchors.js: {} + dependencies: + - core/jquery