PageSourceSearch

https://ringbot.io/wp-content/themes/saspik/assets/js/app.js?ver=1.0.0

js ringbot.io collected 2026-10-06 05:22:55 UTC 22,709 bytes, 593 lines download raw bytes

1var PIXELSIGNS = PIXELSIGNS || {};
2
3(function ($) {
4
5    /*!----------------------------------------------
6    	# This beautiful code written with heart
7    	# by Mominul Islam <[email protected]>
8    	# In Dhaka, BD at the PixelSigns Theme workstation.
9    	---------------------------------------------*/
10
11    // USE STRICT
12    "use strict";
13
14    PIXELSIGNS.initialize = {
15
16        init: function () {
17            PIXELSIGNS.initialize.general();
18            PIXELSIGNS.initialize.sectionBackground();
19            PIXELSIGNS.initialize.sectionSwitch();
20            PIXELSIGNS.initialize.portfolio();
21            PIXELSIGNS.initialize.swiperSlider();
22            PIXELSIGNS.initialize.countUp();         
23            PIXELSIGNS.initialize.googleMap();
24            PIXELSIGNS.initialize.contactFrom();
25        },
26
27        /*========================================================*/
28        /*=           Collection of snippet and tweaks           =*/
29        /*========================================================*/
30
31        general: function () {
32
33            //Popup Search
34            $('#search-menu-wrapper').removeClass('toggled');
35
36            $('#search-icon').on('click', function(e) {
37                e.stopPropagation();
38                $('#search-menu-wrapper').toggleClass('toggled');
39                $("#popup-search").focus();
40            });
41
42            $('#search-menu-wrapper input').on('click', function(e) {
43                e.stopPropagation();
44            });
45
46            $('#search-menu-wrapper, body').on('click', function() {
47                $('#search-menu-wrapper').removeClass('toggled');
48            });
49
50            /* Wow Js Init */
51
52            var wow = new WOW({
53                boxClass: 'wow',
54                animateClass: 'animated',
55                offset: 0,
56                mobile: false,
57                live: true,
58                scrollContainer: null,
59            });
60            wow.init();
61
62            /* Bootstrap Accordion  */
63            $('.faq .card').each(function () {
64                var $this = $(this);
65                $this.on('click', function (e) {
66                    var has = $this.hasClass('active');
67                    $('.faq .card').removeClass('active');
68                    if (has) {
69                        $this.removeClass('active');
70                    } else {
71                        $this.addClass('active');
72                    }
73                });
74            });
75
76            /* Magnefic Popup */
77            $('.popup-video').each (function() {
78                $('.popup-video').magnificPopup({
79                    type: 'iframe'
80                });
81            });
82
83            if ($("#wpadminbar").length && $(window).width() < 768) {
84                $("#wpadminbar").css({
85                    position: "fixed",
86                    top: "0"
87                })
88            }
89
90            /* Domain Check */
91            var DomainCheck = {
92                submit: function (e) {
93                    e.preventDefault();
94
95                    var obj = e.data,
96                        el = obj.wap.find("#pix-domain-results"),
97                        domainDefault = "pixelsign.art",
98                        basename = obj.input.val() !== "" ? obj.input.val() : domainDefault,
99                        ext = obj.select.val() !== "" ? obj.select.val() : '',
100                        whmcs_url = obj.whmcs_url.val() !== "" ? obj.whmcs_url.val() : '',
101                        extension = DomainCheck.dotExt(obj.input.val());
102
103                    var domainName = "";
104                    if (basename.indexOf('.') > -1) {
105                        domainName = basename;
106                    } else if (basename.indexOf('.') == -1) {
107                        domainName = basename + (ext ? '.' + ext : '.com');
108                    }
109
110                    obj.security = obj.form.find("input[name=security]").val();
111                    obj.el = el;
112                    var domainData = {},
113                        domainResultTable = $(
114                            '<div id="pix_result_item" class="pix-result-domain-box" role="alert"> </div></div>'
115                        ),
116                        domainResult = $(
117                            '<div class="inner-block-result-item">' +
118                            '<div class="spinner tt-loading-results text-center">' +
119                            '<i class="fas fa-spinner fa-spin fa-lg fa-fw"></i>' +
120                            '<span> Seaching...</span>' +
121                            '<span class="sr-only">...</span>' +
122                            "</div>"
123                        );
124
125                    $.extend(domainData, obj);
126                    domainData.domain = domainName;
127                    domainData.extension = extension;
128                    domainData.whmcs_url = whmcs_url;
129                    domainData.el = domainResult;
130
131                    domainResult.data("domain", domainData.domain);
132
133                    if (obj.el.find("#pix_result_item").length == 0) {
134                        obj.el.append(domainResultTable);
135                        obj.el.find("#pix_result_item").append(domainResult);
136                    } else {
137                        obj.el.find("#pix_result_item").remove();
138                        obj.el.append(domainResultTable);
139                        obj.el.find("#pix_result_item").append(domainResult);
140                    }
141
142                    DomainCheck.checkAjax(domainData);
143                },
144
145                name: function (domain) {
146                    return domain.replace(/^.*\/|\.[^.]*$/g, "");
147                },
148
149                dotExt: function (ext) {
150                    var fExt,
151                        tExt = ext.split(".", 3);
152
153                    if (tExt[1] === undefined) {
154                        fExt = "com";
155                    } else if (tExt[0] === "www") {
156                        fExt = tExt[2];
157                    } else {
158                        fExt = tExt[1];
159                    }
160
161                    return fExt;
162                },
163
164                checkAjax: function (obj) {
165                    var data = {
166                        domain: obj.domain,
167                        whmcs_url: obj.whmcs_url,
168                        action: "pix_ajax_search_domain",
169                        security: obj.security,
170                    };
171
172                    $.ajax({
173                        url: tt_ajax_url,
174                        type: "POST",
175                        dataType: "json",
176                        data: data,
177                        success: function (data) {
178                            obj.el.find(".spinner").remove();
179                            obj.el.append(data.results_html);
180                        },
181                        error: function (xhr, ajaxOptions, thrownError) {
182                            console.log(xhr);
183                            console.log(thrownError);
184                        },
185                    });
186                },
187            };
188
189            $("#pix-domain-search").is(function () {
190
191                var id = $(this),
192                    submitEl = id.find("#pix-search"),
193                    inputEl = id.find("#pix-domain"),
194                    selectEl = id.find("#domainext"),
195                    formEl = id.find("#pix-domain-form"),
196                    acEl = id.find('input[name="whmcs_url"]'),
197                    data;
198
199                data = {
200                    submit: submitEl,
201                    input: inputEl,
202                    select: selectEl,
203                    whmcs_url: acEl,
204                    form: formEl,
205                    div: id,
206                    wap: id,
207                };
208
209
210                submitEl.attr("disabled", true);
211                inputEl.keyup(function () {
212                    if ($(this).val().length != 0) submitEl.attr("disabled", false);
213                    else submitEl.attr("disabled", true);
214                });
215
216                submitEl.on("click", data, DomainCheck.submit);
217            });
218
219        },
220
221        /*====================================*/
222        /*=           Swiper Slider          =*/
223        /*====================================*/
224
225        swiperSlider: function () {
226            $('#related-portfolio').each(function () {   
227
228                var id = $(this).attr('id');
229                var perpage = $(this).data('perpage') || 1;
230                var loop = $(this).data('loop') || true;
231                var speed = $(this).data('speed') || 700;
232                var autoplay = $(this).data('autoplay') || 50000;
233                var space = $(this).data('space') || 0;
234                var effect = $(this).data('effect');
235                var direction = $(this).data('direction') || 'horizontal';
236                var breakpoints = $(this).data('breakpoints');
237
238                var swiper = new Swiper($(this), {
239                    slidesPerView: perpage,
240                    spaceBetween: space,                  
241                    loop: true,
242                    speed: speed, 
243                    effect: effect,                               
244                    breakpoints: breakpoints,
245                    autoplay: autoplay,                     
246                    pagination: ".swiper-pagination",
247                    paginationClickable: true,
248                    navigation: {
249                        nextEl: '.swiper-button-next',
250                        prevEl: '.swiper-button-prev',
251                    },
252                    fadeEffect: {
253                        crossFade: true
254                      },
255                });
256            });
257            
258        },
259
260        /*==============================*/
261        /*=           Portfolio          =*/
262        /*==============================*/
263
264        portfolio: function () {
265
266            if ((typeof $.fn.imagesLoaded !== 'undefined') && (typeof $.fn.isotope !== 'undefined')) {
267
268                $(".pixsass-portfolio-items").imagesLoaded(function () {
269                    var container = $(".pixsass-portfolio-items");
270
271                    container.isotope({
272                        itemSelector: '.pixsass-portfolio-item',
273                        // percentPosition: true,
274                        // transitionDuration: '0.5s',
275
276                            // columnWidth: '.grid-sizer',
277                            layoutMode: 'masonry',
278
279                    });
280
281                    $('.pixsass-isotope-filter a').on('click', function () {
282                        $('.pixsass-isotope-filter').find('.current').removeClass('current');
283                        $(this).parent().addClass('current');
284
285                        var selector = $(this).attr("data-filter");
286                        container.isotope({
287                            filter: selector
288                        });
289
290                        return false;
291                    });
292
293                    $(window).resize(function () {
294                        container.isotope();
295                        blogContainer.masonry();
296                    });
297
298                });
299
300                var blogContainer = $(".saaspik-masonry");
301
302                blogContainer.masonry({
303                    itemSelector: '.grid-item',
304                    percentPosition: true
305                });
306
307            }
308        },
309
310        /*============================*/
311        /*=           Tabs           =*/
312        /*============================*/
313
314        tab: function() {
315            $(".tab-nav-item > .acc-btn").on("click", function() {
316                if ($(this).hasClass("active")) {
317                    $(this).removeClass("active");
318                    $(this)
319                        .siblings(".tab-nav-item .content")
320                        .slideUp(400);
321                    $(".tab-nav-item > .acc-btn i")
322                        .removeClass("fa-minus")
323                        .addClass("fa-plus");
324                } else {
325                    $(".tab-nav-item > .acc-btn i")
326                        .removeClass("fa-minus")
327                        .addClass("fa-plus");
328                    $(this)
329                        .find("i")
330                        .removeClass("fa-plus")
331                        .addClass("fa-minus");
332                    $(".tab-nav-item > .acc-btn").removeClass("active");
333                    $(this).addClass("active");
334                    $(".tab-nav-item .content").slideUp(400);
335                    $(this)
336                        .siblings(".content")
337                        .slideDown(400);
338                }
339            });
340
341
342            var tabItems = $('.gp-tabs-navigation li'),
343                tabContentWrapper = $('.gp-tabs-content');
344
345            tabItems.on('click', function(event) {
346                event.preventDefault();
347                var selectedItem = $(this);
348                if (!selectedItem.hasClass('active-tab')) {
349                    var selectedTab = selectedItem.data('content'),
350                        selectedContent = tabContentWrapper.find('.pix-tab-item[data-content="' + selectedTab + '"]'),
351                        slectedContentHeight = selectedContent.innerHe
351ight();
352
353                    tabItems.removeClass('active-tab');
354                    selectedItem.addClass('active-tab');
355                    selectedContent.addClass('active-tab').siblings('.pix-tab-item').removeClass('active-tab');
356                    //animate tabContentWrapper height when content changes
357                    tabContentWrapper.animate({
358                        'height': slectedContentHeight
359                    }, 500);
360                }
361            });
362
363            //hide the .gp-tabs::after element when tabbed navigation has scrolled to the end (mobile version)
364            checkScrolling($('.gp-tabs nav'));
365            $(window).on('resize', function() {
366                checkScrolling($('.gp-tabs nav'));
367                tabContentWrapper.css('height', 'auto');
368            });
369
370            $('.gp-tabs nav').on('scroll', function() {
371                checkScrolling($(this));
372            });
373
374            function checkScrolling(tabs) {
375                var totalTabWidth = parseInt(tabs.children('.gp-tabs-navigation').width()),
376                    tabsViewport = parseInt(tabs.width());
377                if (tabs.scrollLeft() >= totalTabWidth - tabsViewport) {
378                    tabs.parent('.gp-tabs').addClass('is-ended');
379                } else {
380                    tabs.parent('.gp-tabs').removeClass('is-ended');
381                }
382            }
383        },
384
385        /*==========================================*/
386        /*=           Section Background           =*/
387        /*==========================================*/
388
389        sectionBackground: function () {
390
391            // Section Background Image
392            $('[data-bg-image]').each(function () {
393                var img = $(this).data('bg-image');
394                $(this).css({
395                    backgroundImage: 'url(' + img + ')',
396                });
397            });
398        },
399
400        /*=====================================*/
401        /*=           Section Switch          =*/
402        /*=====================================*/
403
404        sectionSwitch: function () {
405            $('[data-type="section-switch"], #menu-home li a, .scroll-btn').on('click', function () {
406                if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
407                    var target = $(this.hash);
408                    if (target.length > 0) {
409
410                        target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
411                        $('html,body').animate({
412                            scrollTop: target.offset().top
413                        }, 1000);
414                        return false;
415                    }
416                }
417            });
418        },
419
420        /*==============================*/
421        /*=           Countup          =*/
422        /*==============================*/
423
424        countUp: function () {
425            var options = {
426                useEasing: true,
427                useGrouping: true,
428                separator: ',',
429                decimal: '.',
430                prefix: '',
431                suffix: ''
432            };
433
434            var counteEl = $('[data-counter]');
435
436            if (counteEl) {
437                counteEl.each(function () {
438                    var val = $(this).data('counter');
439
440                    var countup = new CountUp(this, 0, val, 0, 2.5, options);
441                    $(this).appear(function () {
442                        countup.start();
443                    }, {
444                        accX: 0,
445                        accY: 0
446                    })
447                });
448            }
449        },
450
451        /*=================================*/
452        /*=           Google Map          =*/
453        /*=================================*/
454
455        googleMap: function () {
456            $('.gmap3-area').each(function () {
457                var $this = $(this),
458                    key = $this.data('key'),
459                    lat = $this.data('lat'),
460                    lng = $this.data('lng'),
461                    mrkr = $this.data('mrkr'),
462                    zoom = $this.data('zoom'),
463                    scrollwheel = $this.data('scrollwheel') || false;
464
465                $this.gmap3({
466                        center: [lat, lng],
467                        zoom: zoom,
468                        scrollwheel: scrollwheel,
469                        mapTypeId: google.maps.MapTypeId.ROADMAP,
470                        styles: [{
471                            "featureType": "administrative.country",
472                            "elementType": "geometry.fill",
473                            "stylers": [{
474                                "visibility": "on"
475                            }]
476                        }]
477                    })
478                    .marker(function (map) {
479                        return {
480                            position: map.getCenter(),
481                            icon: mrkr
482                        };
483                    })
484
485            });
486        },
487
488        /*=================================*/
489        /*=           Contact Form          =*/
490        /*=================================*/
491
492        contactFrom: function () {
493
494            $('[data-saaspik-form]').each(function () {
495                var $this = $(this);
496                $('.form-result', $this).css('display', 'none');
497
498                $this.submit(function () {
499
500                    $('button[type="submit"]', $this).addClass('clicked');
501
502                    // Create a object and assign all fields name and value.
503                    var values = {};
504
505                    $('[name]', $this).each(function () {
506                        var $this = $(this),
507                            $name = $this.attr('name'),
508                            $value = $this.val();
509                            values[$name] = $value;
510                    });
511
512                    // Make Request
513                    $.ajax({
514                        url: $this.attr('action'),
515                        type: 'POST',
516                        data: values,
517                        success: function success(data) {
518
519                            if (data.error == true) {
520                                $('.form-result', $this).addClass('alert-warning').removeClass('alert-success alert-danger').fadeIn(200).show().fadeOut(2000);
521                            } else {
522                                $('.form-result', $this).addClass('alert-success').removeClass('alert-warning alert-danger').fadeIn(200).show().fadeOut(2000);
523                            }
524                            $('.form-result > .content', $this).html(data.message);
525                            $('button[type="submit"]', $this).removeClass('clicked');
526                            $this.trigger("reset");
527                        },
528                        error: function error() {
529                            $('.form-result', $this).addClass('alert-danger').removeClass('alert-warning alert-success').css('display', 'block');
530                            $('.form-result > .content', $this).html('Sorry, an error occurred.');
531                            $('button[type="submit"]', $this).removeClass('clicked');
532                        }
533                    });
534                    return false;
535                });
536
537            });
538        }
539
540    };
541
542    PIXELSIGNS.documentOnReady = {
543        init: function () {
544            PIXELSIGNS.initialize.init();
545            /*
546             ** Plugin IF visible element
547             */
548            jQuery.fn.is_visible = function (){
549                var elementTop = jQuery(this).offset().top;
550                var elementBottom = elementTop + jQuery(this).outerHeight();
551                var viewportTop = jQuery(window).scrollTop();
552                var viewportBottom = viewportTop + jQuery(window).height();
553                return elementBottom > viewportTop && elementTop < viewportBottom;
554            }
555        },
556    };
557
558    PIXELSIGNS.documentOnLoad = {
559        init: function () {
560            $("#preloader").fadeOut("slow");
561        },
562    };
563
564    PIXELSIGNS.documentOnResize = {
565        init: function () {
566            if ($("#wpadminbar").length && $(window).width() < 768) {
567                $("#wpadminbar").css({
568                    position: "fixed",
569                    top: "0"
570                })
571            }
572        },
573    };
574
575    PIXELSIGNS.documentOnScroll = {
576        init: function () {
577            PIXELSIGNS.initialize.sectionBackground();
578
579            if ($(window).scrollTop() > 300) {
580                $('.return-to-top').addClass('back-top');
581            } else {
582                $('.return-to-top').removeClass('back-top');
583            }
584        },
585    };
586
587    // Initialize Functions
588    $(document).ready(PIXELSIGNS.documentOnReady.init);
589    $(window).on('load', PIXELSIGNS.documentOnLoad.init);
590    $(window).on('resize', PIXELSIGNS.documentOnResize.init);
591    $(window).on('scroll', PIXELSIGNS.documentOnScroll.init);
592
593})(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.