diff --git a/js/js.js b/js/js.js
index e18bab3..46efe8b 100644
--- a/js/js.js
+++ b/js/js.js
@@ -48,6 +48,24 @@
});
}
};
+
+ Drupal.behaviors.footnoteScroll = {
+ attach: function attach(context, settings) {
+
+
+ $('.see-footnote').on('click',function(e) {
+ e.preventDefault();
+ var offset = 100;
+ var target = this.hash;
+ if ($(this).data('offset') != undefined) offset = $(this).data('offset');
+ $('html, body').stop().animate({
+ 'scrollTop': $(target).offset().top - offset
+ }, 500, 'swing', function() {
+ // window.location.hash = target;
+ });
+ });
+ }
+ };
//
diff --git a/src/js/js.js b/src/js/js.js
index e18bab3..46efe8b 100644
--- a/src/js/js.js
+++ b/src/js/js.js
@@ -48,6 +48,24 @@
});
}
};
+
+ Drupal.behaviors.footnoteScroll = {
+ attach: function attach(context, settings) {
+
+
+ $('.see-footnote').on('click',function(e) {
+ e.preventDefault();
+ var offset = 100;
+ var target = this.hash;
+ if ($(this).data('offset') != undefined) offset = $(this).data('offset');
+ $('html, body').stop().animate({
+ 'scrollTop': $(target).offset().top - offset
+ }, 500, 'swing', function() {
+ // window.location.hash = target;
+ });
+ });
+ }
+ };
//