PageSourceSearch

https://theracloud.ai/wp-content/themes/onum/js/scripts.js?ver=20190829

js theracloud.ai collected 2026-10-05 12:48:35 UTC 10,602 bytes, 290 lines download raw bytes

1(function( $ ) {
2    "use strict";
3
4    function rtl_slick(){
5        if ($('body').hasClass("rtl")) {
6           return true;
7        } else {
8           return false;
9        }
10    };
11
12    function rtl_isotop() {
13        if ( $( 'body' ).hasClass( 'rtl' ) ) {
14           return false;
15        } else {
16           return true;
17        }
18    };
19
20	/*Gallery Post*/
21    $('.gallery-post').each( function () {
22        $(this).slick({
23            rtl: rtl_slick(),
24            infinite: true,
25            slidesToShow: 1,
26            slidesToScroll: 1,
27            arrows: true,
28            dots: false,
29            autoplay: true,
30            autoplaySpeed: 7000,
31            prevArrow: '<button type="button" class="prev-nav"><i class="flaticon-arrow-pointing-to-left"></i></button>',
32            nextArrow: '<button type="button" class="next-nav"><i class="flaticon-arrow-pointing-to-right"></i></button>',
33            responsive: []
34        });
35    });
36
37    /*Popup Video*/
38    var $video_play = $('.btn-play');
39    if ($video_play.length > 0 ) {
40        $video_play.magnificPopup({
41            type: 'iframe',
42            removalDelay: 160,
43            preloader: true,
44            fixedContentPos: true,
45            callbacks: {
46            beforeOpen: function() {
47                    this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim');
48                    this.st.mainClass = this.st.el.attr('data-effect');
49                }
50            },
51        });
52    }
53
54    /* Particles */
55    $(window).on( 'load', function () {
56        $('.particles-js').each(function () {
57            var s_id = $( this ).data('id'),
58                s_color = $( this ).data('color'),
59                s_color = s_color.replace(/\s/g, ''),
60                e = $('<div class="onum-particles"></div>');
61            $( this ).append(e);    
62            e.attr('id', 'particles-' + s_id );
63
64            var id = 'particles-' + s_id;
65            var color_type = 'random_colors';
66            var color = s_color;
67            var color_line = '#fff';
68            var number = 15;
69            var lines = false;
70            if (color_type == 'random_colors') {
71                color = color.split(',');
72                color_line = color[0]
73            }
74            
75            particlesJS(
76                id, {
77                    "particles":{
78                        "number":{
79                            "value":number,
80                            "density":{
81                                "enable":true,
82                                "value_area":800
83                            }
84                        },
85                        "color":{
86                            "value": color
87                        },
88                        "shape":{
89                            "type":'circle',
90                            "polygon":{
91                                "nb_sides":6
92                            },
93                        },
94                        "opacity":{
95                            "value":1,
96                            "random":true,
97                            "anim":{
98                                "enable":false,
99                                "speed":1,
100                                "opacity_min":1,
101                                "sync":false
102                            }
103                        },
104                        "size":{
105                            "value": 3,
106                            "random":true,
107                            "anim":{
108                                "enable":false,
109                                "speed":30,
110                                "size_min": 1,
111                                "sync":false
112                            }
113                        },
114                        "line_linked":{
115                            "enable":false,
116                            "distance":150,
117                            "color":color_line,
118                            "opacity":0,
119                            "width":1
120                        },
121                        "move":{
122                            "enable":true,
123                            "speed":2,
124                            "direction":"none",
125                            "random":false,
126                            "straight":false,
127                            "out_mode":"out",
128                            "bounce":false,
129                            "attract":{
130                                "enable":false,
131                                "rotateX":600,
132                                "rotateY":1200
133                            }
134                        }
135                    },
136                    "interactivity":{
137                        "detect_on":"canvas",
138                        "events":{
139                            "onhover":{
140                                "enable":true,
141                                "mode":'grab'
142                            },
143                            "onclick":{
144                                "enable":true,
145                                "mode":"push"
146                            },
147                            "resize":true
148                        },
149                        "modes":{
150                            "grab":{
151                                "distance":150,
152                                "line_linked":{
153                                    "opacity":1
154                                }
155                            },
156                            "bubble":{
157                                "distance":200,
158                                "size":3.2,
159                                "duration":20,
160                                "opacity":1,
161                                "speed":30
162                            },
163                            "repulse":{
164                                "distance":80,
165                                "duration":0.4
166                            },
167                            "push":{"particles_nb":4},
168                            "remove":{"particles_nb":2}
169                        }
170                    },
171                    "retina_detect":true
172                });
173            var update;
174            update = function() {
175                requestAnimationFrame(update); 
176            }; 
177            requestAnimationFrame(update);
178        });
179    });
180
181    /*Portfolio Filter*/
182    $(window).on( 'load', function () {
183        if( $( '#projects_grid' ).length > 0 ){
184            var $container = $( '#projects_grid' ); 
185            var $project_grid = $container.isotope({ 
186                    itemSelector : '.project-item', 
187                    isOriginLeft: rtl_isotop(),
188                    animationEngine : 'css',
189                    masonry: {
190                        columnWidth: '.project-grid-sizer'
191                    },
192                });
193
194            /*Refresh the layout of the grid each time an image gets loaded*/
195            $project_grid.imagesLoaded().progress( function() {
196                $project_grid.isotope('layout');
197            });  
198
199            var $optionSets = $('.project_filters'),
200                $optionLinks = $optionSets.find('a');
201
202            $optionLinks.on( 'click', function(){
203                var $this = $(this);
204
205                if ( $this.hasClass('selected') ) {
206                    return false;
207                }
208                var $optionSet = $this.parents('.project_filters');
209                    $optionSets.find('.selected').removeClass('selected');
210                    $this.addClass('selected');
211
212                var selector = $(this).attr('data-filter');
213                    $container.isotope({ 
214                        filter: selector 
215                    });
216                return false;
217            });
218        };    
219
220        if( $( '.blog-grid' ).length > 0 ){
221            var $blog_grid = $('.blog-grid').isotope({ 
222                    itemSelector : '.masonry-post-item', 
223                    isOriginLeft: rtl_isotop(),
224                    animationEngine : 'css',
225                    masonry: {
226                        columnWidth: '.post-grid-sizer'
227                    },
228                });
229
230            /*Refresh the layout of the grid each time an image gets loaded*/
231            $blog_grid.imagesLoaded().progress( function() {
232                $blog_grid.isotope( 'layout' );
233            });
234        };
235    });
236
237    /*Gird Lines*/
238    $('.has-lines').each(function () {
239        var l  = $('<div class="grid-lines"><span class="g-line line-left"><span class="g-dot"></span></span><span class="g-line line-cleft"><span class="g-dot"></span></span><span class="g-line line-cright"><span class="g-dot"></span></span><span class="g-line line-right"><span class="g-dot"></span></span></div>');
240        $(this).prepend(l);
241    });
242
243    /* Royal Preloader */
244    if ( $( '#royal_preloader' ).length ) {
245        var $selector       = $('#royal_preloader'),
246            $width          = $selector.data('width'),
247            $height         = $selector.data('height'),
248            $color          = $selector.data('color'),
249            $bgcolor        = $selector.data('bgcolor'),
250            $logourl        = $selector.data('url');
251        
252        Royal_Preloader.config({
253            mode           : 'logo',
254            logo           : $logourl,
255            logo_size      : [$width, $height],
256            showProgress   : true,
257            showPercentage : true,
258            text_colour: $color,
259            background:  $bgcolor,
260        });        
261    }; 
262
263    /* ========================================== 
264    Back To Top
265    ========================================== */
266    if ( $('#back-to-top').length) {
267        var scrollTrigger = 500, /* px */
268            backToTop = function () {
269                var scrollTop = $(window).scrollTop();
270                if (scrollTop > scrollTrigger) {
271                    $('#back-to-top').addClass('show');
272                } else {
273                    $('#back-to-top').removeClass('show');
274                }
275            };
276        backToTop();
277        $(window).on( 'scroll', function () {
278            backToTop();
279        });
280        $('#back-to-top').on( 'click', function (e) {
281            e.preventDefault();
282            $('html,body').animate({
283                scrollTop: 0
284            }, 700);
285        }); 
286    };
287
288})( jQuery );
289
290

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.