PageSourceSearch

https://www.ville-caromb.fr/typo3conf/ext/arc_projet/Resources/Pub…/js/scripts/scrollingNav.js?1773325747

js ville-caromb.fr collected 2026-10-02 11:10:17 UTC 2,748 bytes, 70 lines download raw bytes

1jQuery(function ($) {
2    if($('.col--summary').length) {
3        var viewport = $(window);
4        var viewportHeight = viewport.height();
5
6        /* ==========================================================================
7        Build the Scroll Menu based on Sections .anchors--list-item
8        ========================================================================== */
9
10        var containerScollingNav = $('.col--summary');
11        var scrollItem = $('#col--main > h2.title--line');
12        var titleClass= 'title--line';
13        var titleAnchor = 'h2.title--line';
14        var menuActive = $('.anchors--list');
15        if(!$('.header--nav').length){
16            //site ventoux
17            mainMenuFixedHeight=$('#header').height()/4;
18        }
19        var colMain = $('#col--main');
20
21        function sectionListen() {
22            viewportHeight = viewport.height();
23            bannerHeight = (viewportHeight);
24        }
25        sectionListen();
26        viewport.resize(sectionListen);
27        viewport.bind('orientationchange', function () {
28            sectionListen();
29        });
30
31        if (containerScollingNav.length) {
32            menuActive.append('<ul class="anchors--list-items progress"></ul>');
33
34            // For each main content level 2 title
35            /* ---------------------------------- */
36            scrollItem.each(function (index) {
37                $(this).addClass('itemAnchor' + index);
38                var anchor = 'itemAnchor' + index;
39                var title = $(this).text();
40                // wrap title with div with anchor refarence for id 
41                $('.' + anchor).wrapAll('<div id="' + anchor + '" class="partContent" ></div>');
42                // create item in anchors list
43                $('.anchors--list-items').append('<li class="anchors--list-item bar"><a class="anchors--list-link" href="#' + anchor + '">' + title + '</a><span class="anchors--list-progress"></span></li>');
44            });
45        } else {
46            $('.anchors--list').hide();
47        }
48
49        /* ==========================================================================
50        Smooth Scroll
51        ========================================================================== */
52
53        $(function () {
54            if ($(".progress").length) {
55
56                // Smooth Scroll Links
57                $(".progress .bar a").click(function (e) {
58                    var hash = this.hash.substr(1);
59                    console.log(hash);
60                    if($("#" + hash).offset().top){
61                        $('html, body').animate({scrollTop: $("#" + hash).offset().top - 100}, 800);
62                    }
63
64                    return false;
65                });
66
67            }
68        });
69    }
70});

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.