source: extensions/Slim/js/jcarousel.skeleton.js @ 25997

Last change on this file since 25997 was 25997, checked in by Miklfe, 10 years ago
File size: 1.6 KB
Line 
1(function($) {
2    $(function() {
3        /*
4        Carousel initialization
5        */
6        $('.jcarousel')
7            .jcarousel({
8                // Options go here
9            })         
10                        .jcarouselAutoscroll({
11                        interval: 3000,
12                        target: '+=1',
13                        autostart: true
14                        });     
15
16
17        /*
18         Prev control initialization
19         */
20        $('.jcarousel-control-prev')
21            .on('jcarouselcontrol:active', function() {
22                $(this).removeClass('inactive');
23            })
24            .on('jcarouselcontrol:inactive', function() {
25                $(this).addClass('inactive');
26            })
27            .jcarouselControl({
28                // Options go here
29                target: '-=1'
30            });
31
32        /*
33         Next control initialization
34         */
35        $('.jcarousel-control-next')
36            .on('jcarouselcontrol:active', function() {
37                $(this).removeClass('inactive');
38            })
39            .on('jcarouselcontrol:inactive', function() {
40                $(this).addClass('inactive');
41            })
42            .jcarouselControl({
43                // Options go here
44                target: '+=1'
45            });
46
47        /*
48         Pagination initialization
49         */
50        $('.jcarousel-pagination')
51            .on('jcarouselpagination:active', 'a', function() {
52                $(this).addClass('active');
53            })
54            .on('jcarouselpagination:inactive', 'a', function() {
55                $(this).removeClass('active');
56            })
57            .jcarouselPagination({
58                // Options go here
59            });
60                       
61    });
62})(jQuery);
Note: See TracBrowser for help on using the repository browser.