PageSourceSearch

https://zooreach.org/wordpress/wp-content/plugins/cyclone-slider-pro/js/client.js?ver=2.10.4

js zooreach.org collected 2026-10-02 08:43:06 UTC 6,061 bytes, 137 lines download raw bytes

1jQuery(document).ready(function($){
2    
3    /*** Lightbox ***/
4    (function() {
5        try{
6            $('.cycloneslider').each(function(i){ /* Loop thru each slider */
7                var items = [];
8                
9                $(this).find('.magnific-pop').each(function(i){ /* Loop thru each magnific popup links with images */
10                    var title = $(this).next().find('.cycloneslider-caption-title').text();
11                    
12                    items.push({
13                        src: $(this).find('img').attr('src'),
14                        type: 'image',
15                        title: title
16                    });
17                });
18                $(this).data('items', items);
19            });
20            
21            $('.cycloneslider').on('click', '.cycloneslider-slide-image.cycle-slide-active', function(e){ /* Add only to image slide */
22                
23                var slider = $(this).parents('.cycloneslider'),
24                    items = slider.data('items'),
25                    slides = slider.children('.cycloneslider-slides'),
26                    index = $(this).index('.cycloneslider-slide-image');
27                
28                if (items.length>0) {
29                    e.preventDefault();
30                    $.magnificPopup.open({
31                        items: items,
32                        gallery: {
33                            enabled: true
34                        },
35                        callbacks: {
36                            beforeOpen: function() {
37                                slides.cycle('pause');
38                            },
39                            close: function() {
40                                slides.cycle('resume');
41                            }
42                        }
43                    });
44                    $.magnificPopup.instance.goTo( index );
45                }
46            })
47        } catch (ignore) {}
48    })();
49    
50});
51
52/*** Global template functionalities ***/
53(function() {
54    var slides_selector = '.cycloneslider-template-dark .cycloneslider-slides';
55    
56    slides_selector += ',.cycloneslider-template-default .cycloneslider-slides';
57    slides_selector += ',.cycloneslider-template-standard .cycloneslider-slides';
58    slides_selector += ',.cycloneslider-template-thumbnails .cycloneslider-slides';
59    
60    slides_selector += ',.cycloneslider-template-galleria .cycloneslider-slides';
61    slides_selector += ',.cycloneslider-template-text .cycloneslider-slides';
62    slides_selector += ',.cycloneslider-template-dos .cycloneslider-slides';
63    
64    jQuery(document).on('cycle-before', slides_selector, function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
65        var slide = jQuery( outgoingSlideEl ), /* Current slide */
66            curHeight = 0,
67            nextHeight = 0;
68        
69        /* Autoheight when dynamic height is on */
70        /* Using getBoundingClientRect() instead of jQuery's outerHeight() for more accurate reading (floating point values) */
71        if( "on" == optionHash.dynamicHeight ) {
72            curHeight = jQuery(outgoingSlideEl)[0].getBoundingClientRect().height;
73            if ( undefined == curHeight || 0 == curHeight ) { /* IE8 returns undefined so we use outerHeight as fallback. Also works for older templates! */
74                curHeight = jQuery(outgoingSlideEl).outerHeight();
75            }
76            
77            nextHeight = jQuery(incomingSlideEl)[0].getBoundingClientRect().height;
78            if ( undefined == nextHeight || 0 == nextHeight ) { /* IE8 returns undefined so we use outerHeight as fallback. Also works for older templates! */
79                nextHeight = jQuery(incomingSlideEl).outerHeight();
80            }
81            if ( nextHeight != curHeight ) jQuery(this).animate({height:nextHeight}, optionHash.autoHeightSpeed, optionHash.autoHeightEasing);
82        }
83        
84        if(slide.hasClass('cycloneslider-slide-youtube')) pauseYoutube( slide ); /* Pause youtube video on next */
85        
86        if(slide.hasClass('cycloneslider-slide-vimeo')) pauseVimeo( slide ); /* Pause vimeo video on next */
87    });
88
89    jQuery(document).on('cycle-initialized cycle-after', slides_selector, function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
90        var index = (event.type == 'cycle-initialized') ? optionHash.currSlide : optionHash.nextSlide;
91        var slide = jQuery( optionHash.slides[ index ] ); /* Current slide */
92        
93        /* Make sure current slide has the highest z-index.
94        Fix for issue when previous slides appear on top of the current slide due to cycle's weird z-index assigments */
95        if( false == optionHash.hideNonActive ) slide.css('zIndex', parseInt(slide.css('zIndex'))+20);
96    });
97    
98    function pauseYoutube( slide ){
99        var data = {
100            "event": "command",
101            "func": "pauseVideo",
102            "args": [],
103            "id": ""
104        }
105        postMessage( slide.find('iframe'), data, '*');
106    }
107    
108    function pauseVimeo( slide ){
109        postMessage( slide.find('iframe'), {method:'pause'}, slide.find('iframe').attr('src'));
110    }
111    
112    function postMessage(iframe, data, url){
113        try{
114            if (iframe[0]) { // Frame exists
115                iframe[0].contentWindow.postMessage(JSON.stringify(data), url);
116            }
117        } catch (ignore) {}
118    }
119    
120    jQuery(document).on('keyup', '.cycloneslider', function( e ) {
121        var KEY_LEFT = 37,
122            KEY_RIGHT = 39,
123            key = null;
124        
125        e = e || window.event; // Use param e if it exists. use window.event otherwise (for <=IE8)
126
127        key = e.keyCode;
128        
129        if ( key == KEY_LEFT ) {
130            jQuery(this).children('.cycle-slideshow').cycle('prev');
131        } else if ( key == KEY_RIGHT ) {
132            jQuery(this).children('.cycle-slideshow').cycle('next');
133        }
134        
135    });
136})();
137

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.