PageSourceSearch

https://akks.no/wp-content/themes/flex/assets/js/home-sections.js?ver=1.0

js akks.no collected 2026-10-04 13:34:01 UTC 1,422 bytes, 56 lines download raw bytes

1var Idium = Idium || {};
2
3Idium.NextSectionLinks = (function ($) {
4    "use strict";
5
6    var $homeSections;
7
8    var fixNextSectionLinks = function () {
9        $homeSections.each(function(idx) {
10            if ($homeSections.eq(idx + 1).length) {
11                $homeSections.eq(idx).find('.js-scroll-next').attr('href', 
12                    '#' + $homeSections.eq(idx + 1).attr('id')
13                );
14            }
15            else {
16                $homeSections.eq(idx).find('.home-section__next').remove();
17            }
18        });
19    };
20
21    var scrollTo = function (anchor) {
22      var $el = $(anchor);
23      var $header = $('.header');
24      var delay = (distanceTo($el)) / 2;
25
26      $('html, body').stop(true).animate({
27            scrollTop: ($el.offset().top - $header.outerHeight())
28        },
29        delay,
30        'linear'
31      );
32    };
33
34    var distanceTo = function ($el) {
35      return Math.abs($(window).scrollTop() - $el.offset().top);
36    };
37
38    return {
39        init: function () {
40            $homeSections = $('.home-section');
41            
42            fixNextSectionLinks();
43
44            $homeSections.eq(0).find('.home-section__next').show();
45
46            $('.js-scroll-next').click(function (e) {
47                e.preventDefault();
48                scrollTo($(this).attr('href'));
49            });
50        }
51    }
52})(jQuery);
53
54jQuery(function ($) {
55    Idium.NextSectionLinks.init();
56});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.