PageSourceSearch

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

js ocr.org.uk collected 2026-10-01 11:30:00 UTC 2,083 bytes, 62 lines download raw bytes

1/*jslint browser: true*/
2/*global $, jQuery*/
3// JavaScript Document
4$(function () {
5    "use strict";
6    var autoTimer; /* Adding Slides class for carousel <UL>*/
7    $(".caCarousel > ul").addClass("slides");
8
9    $("div.caCarousel").each(function () {
10
11        if ($(this).attr("data-target")) {
12            autoTimer = $(this).attr("data-target");
13        } else {
14            autoTimer = 2000;
15        }
16
17        var carousel = $(this).flexslider({
18            animation: "slide",
19            directionNav: true,
20            controlNav: true,
21            pauseOnHover: false,
22            pauseOnAction: true,
23            keyboardNav: false,
24            mousewheel: false,
25            slideToStart: 0,
26            useCSS: false,
27            slideshowSpeed: autoTimer,
28            after: function (slider) {
29                if ($(slider).data("expanded") === true) {
30                    var current = $("li.flex-active-slide", slider),
31                        target = $(current).attr('data-target');
32
33                    $("a[href=" + target + "]", current).click();
34                    $(slider).data("expanded", true);
35                    if (slider.playing === true) {
36                        slider.flexslider("pause");
37                    }
38                } else {
39                    if (slider.playing === false) {
40                        slider.flexslider("play");
41                    }
42                }
43            }
44        });
45
46        $(this).mouseover(function () {
47            if ($(this).data("expanded") !== true) {
48                if ($(this).data('flexslider') && $(this).data('flexslider').playing === true) {
49                    $(this).flexslider("pause");
50                }
51            }
52        });
53
54        $(this).mouseout(function () {
55            if ($(this).data("expanded") !== true) {
56                if ($(this).data('flexslider') && $(this).data('flexslider').playing === false) {
57                    $(this).flexslider("play");
58                }
59            }
60        });
61    });
62});

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.