PageSourceSearch

https://education.qld.gov.au/_layouts/15/Z1/skins/scripts/controls…/currentnav.accordion.setup.js?v=1.01

js education.qld.gov.au collected 2026-10-01 10:26:19 UTC 3,030 bytes, 68 lines download raw bytes

1// EXPAND/COLLAPSE FUNCTIONALITY IN SIDE NAVIGATION
2function sideNavigationAccordian() {
3    if ($('#sideNavBox .menu-item.selected').length) {
4        $('#sideNavBox li.static').removeClass('selected');
5        var selected = $('#sideNavBox .menu-item.selected').parents('li.static');
6        selected.addClass('selected');
7
8        $('#sideNavBox .menu-item.selected').parents('li.static').last().siblings()
9            .find('ul').hide();
10    }
11    else $('#sideNavBox .root.static > li.static > ul').hide();
12
13    //Quick links menu
14    $('#sideNavBox div.ms-core-listMenu-verticalBox:not(".ms-ql-additionaltopsection") ul.root.static li').each(function () {
15        var liItem = $(this);
16        var aItem = liItem.children('a');
17        var aItemText = aItem.text();
18        var minus = 'fa-minus';
19        var plus = 'fa-plus';
20
21        //Find elements with child lists.
22        if (liItem.find('ul').length) {
23            //Add the father class.
24            liItem.addClass('father');
25            //Insert an image element, with an on click event.
26
27            //Remove tabindex from anchors
28            liItem.find('a').removeAttr('tabindex');
29
30            aItem.children('span.dynamic-children').removeAttr('aria-haspopup');
31
32            ($('<button class="customButton sideNavBoxExpandCollapse" type="button" aria-label="' + aItemText + '" aria-expanded="false"><span aria-hidden="true" class="fa ' + plus + ' lnexpand" ></span></button>').insertBefore(aItem)).on('click', function () {
33                if ($(this).siblings('ul').css('display') === 'none') {
34                    //Show the child elements.
35                    $(this).addClass('selected').siblings('ul').stop().slideDown(250);
36                    //Change the span to a minus.
37                    $(this).attr({ 'aria-expanded': 'true' }).find('span.lnexpand').removeClass(plus).addClass(minus);
38                }
39                else {
40                    //Hide the child elements.
41                    $(this).removeClass('selected').siblings('ul').stop().slideUp(250);
42                    //Change the span to a plus.
43                    $(this).attr({ 'aria-expanded': 'false' }).find('span.lnexpand').removeClass(minus).addClass(plus);
44                }
45            });
46        }
47    });
48
49    //Click the first button to expand
50    if (selected && selected.length) {
51        selected.find(" > button").click();
52    }
53
54    $(document).ready(function () {
55
56        if ($.fn.matchHeight !== undefined) {
57            $('#sideNavBox .sideNavBoxExpandCollapse').each(function () {
58                var menuItem = $(this).siblings('a.menu-item');
59                $(this).matchHeight({ target: menuItem });
60                menuItem.css('box-sizing','border-box').matchHeight({ target: $(this), remove: true });
61            });
62        }
63
64        $('#sideNavBox div.ms-core-listMenu-verticalBox').css('opacity', 1);
65    });
66}
67
68sideNavigationAccordian(); //Init right after control is built

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.