Commit 8891536c authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Refactor JS

parent 59e5748a
......@@ -139,9 +139,7 @@ require('./flash');
scrollToElement(container) {
if (location.hash) {
const offset = 0 - (
$('.js-tabs-affix').outerHeight()
);
const offset = -$('.js-tabs-affix').outerHeight();
const $el = $(`${container} ${location.hash}:not(.match)`);
if ($el.length) {
$.scrollTo($el[0], { offset });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment