PageSourceSearch

https://4malayalees.com/js/slideshow.js

js 4malayalees.com collected 2026-10-02 18:20:57 UTC 2,419 bytes, 69 lines download raw bytes

1$slideshow = {
2    context: false,
3    tabs: false,
4    timeout: 2788,      // time before next slide appears (in ms)
5    slideSpeed: 20,   // time it takes to slide in each slide (in ms)
6    tabSpeed: 200,      // time it takes to slide in each slide (in ms) when clicking through tabs
7    fx: 'scrollLeft',   // the slide effect to use
8    
9    init: function() {
10        // set the context to help speed up selectors/improve performance
11        this.context = $('#slideshow');
12        
13        // set tabs to current hard coded navigation items
14        this.tabs = $('ul.slides-nav li', this.context);
15        
16        // remove hard coded navigation items from DOM 
17        // because they aren't hooked up to jQuery cycle
18        this.tabs.remove();
19        
20        // prepare slideshow and jQuery cycle tabs
21        this.prepareSlideshow();
22    },
23    
24    prepareSlideshow: function() {
25        // initialise the jquery cycle plugin -
26        // for information on the options set below go to: 
27        // http://malsup.com/jquery/cycle/options.html
28        $('div.slides > ul', $slideshow.context).cycle({
29            fx: $slideshow.fx,
30            timeout: $slideshow.timeout,
31            speed: $slideshow.slideSpeed,
32            fastOnEvent: $slideshow.tabSpeed,
33            pager: $('ul.slides-nav', $slideshow.context),
34            pagerAnchorBuilder: $slideshow.prepareTabs,
35            before: $slideshow.activateTab,
36            pauseOnPagerHover: true,
37            pause: true
38        });            
39    },
40    
41    prepareTabs: function(i, slide) {
42        // return markup from hardcoded tabs for use as jQuery cycle tabs
43        // (attaches necessary jQuery cycle events to tabs)
44        return $slideshow.tabs.eq(i);
45    },
46
47    activateTab: function(currentSlide, nextSlide) {
48        // get the active tab
49        var activeTab = $('a[href="#' + nextSlide.id + '"]', $slideshow.context);
50        
51        // if there is an active tab
52        if(activeTab.length) {
53            // remove active styling from all other tabs
54            $slideshow.tabs.removeClass('on');
55            
56            // add active styling to active button
57            activeTab.parent().addClass('on');
58        }            
59    }            
60};
61
62
63$(function() {
64    // add a 'js' class to the body
65    $('body').addClass('js');
66    
67    // initialise the slideshow when the DOM is ready
68    $slideshow.init();
69});  

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.