PageSourceSearch

https://www.ocr.org.uk/js/accordian.js

js ocr.org.uk collected 2026-10-01 11:30:02 UTC 2,216 bytes, 49 lines download raw bytes

1/*jslint browser: true*/
2/*global $, jQuery*/
3$(document).ready(function () {
4    "use strict";
5    prepareAccordian();
6});
7
8function prepareAccordian() {
9    "use strict";
10
11    function collapseAll(anchor) {
12        $(anchor).closest('.accordianGroup').find('.contractable').next("ul").slideUp();
13        $(anchor).closest('.accordianGroup').find('.contractable').next("div").children('ul:first').slideUp();
14        $(anchor).closest('.accordianGroup').find('.contractable').removeClass("contractable").addClass("expandable");
15    }
16    if ($(".accordianGroup")[0]) {
17        $(".accordianGroup a.accordianTab").click(function (e) {
18            e.preventDefault();
19
20            if ($(this).hasClass("expandable")) {
21                collapseAll($(this));
22
23                $(this).next("ul").find("a.accordianTab").removeClass("contractable").addClass("expandable");
24                $(this).next("ul").find("a.accordianTab").siblings("ul").css("display", "none");
25                $(this).next("ul").slideDown();
26                // 
27                $(this).next("div").children('ul:first').find("a.accordianTab").removeClass("contractable").addClass("expandable");
28                $(this).next("div").children('ul:first').find("a.accordianTab").siblings("ul").css("display", "none");
29
30                $(this).next("div").children('ul:first').slideDown();
31                // 
32                $(this).removeClass("expandable").addClass("contractable");
33
34            } else {
35                $(this).removeClass("contractable").addClass("expandable");
36                // 
37                $(this).next("ul").slideUp();
38                $(this).next("ul").find("a.accordianTab").removeClass("contractable").addClass("expandable");
39                $(this).next("ul").find("a.accordianTab").siblings("ul").slideUp();
40                // 
41                $(this).next("div").children('ul:first').slideUp();
42                $(this).next("div").children('ul:first').find("a.accordianTab").removeClass("contractable").addClass("expandable");
43                $(this).next("div").children('ul:first').find("a.accordianTab").siblings("ul").slideUp();
44
45            }
46        });
47    }
48
49}

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.