PageSourceSearch

https://railnewzealand.com/assets/js/jcarousel.responsive.js

js railnewzealand.com collected 2026-09-26 06:40:47 UTC 1,720 bytes, 60 lines download raw bytes

1(function($) {
2    $(function() {
3        var jcarousel = $('.jcarousel');
4
5        jcarousel
6            .on('jcarousel:reload jcarousel:create', function () {
7                var carousel = $(this),
8                    width = carousel.innerWidth();
9
10                if (width >= 1200) {
11                    width = width / 4;
12					//alert (1);
13                }
14				else if ((width < 1199) && (width > 768)){
15                    width = width / 3;
16					//alert (2);
17                }
18				else if ((width < 767) && (width > 360)){
19                    width = width / 2;
20					//alert (3);
21                }
22				 else if(width < 359) {
23                    width = width / 1;
24					//alert (4);
25                }
26
27                carousel.jcarousel('items').css('width', Math.ceil(width) + 'px');
28            })
29            .jcarousel({
30                wrap: 'circular'
31            });
32
33        $('.jcarousel-control-prev')
34            .jcarouselControl({
35                target: '-=1'
36            });
37
38        $('.jcarousel-control-next')
39            .jcarouselControl({
40                target: '+=1'
41            });
42
43        $('.jcarousel-pagination')
44            .on('jcarouselpagination:active', 'a', function() {
45                $(this).addClass('active');
46            })
47            .on('jcarouselpagination:inactive', 'a', function() {
48                $(this).removeClass('active');
49            })
50            .on('click', function(e) {
51                e.preventDefault();
52            })
53            .jcarouselPagination({
54                perPage: 1,
55                item: function(page) {
56                    return '<a href="#' + page + '">' + page + '</a>';
57                }
58            });
59    });
60})(jQuery);

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.