PageSourceSearch

https://shluqu.github.io/static/shluqu/js/main.js

js shluqu.github.io collected 2026-10-03 09:56:52 UTC 4,293 bytes, 127 lines download raw bytes

1(function ($) {
2  "user strict";
3  // Preloader Js
4  $(window).on('load', function () {
5    $('#overlayer').fadeOut(1000);
6    var img = $('.bg_img');
7    img.css('background-image', function () {
8      var bg = ('url(' + $(this).data('background') + ')');
9      return bg;
10    });
11  });
12  $(document).ready(function () {
13    // Nice Select
14    $('.select-bar').niceSelect();
15    // PoPuP 
16    $('.popup').magnificPopup({
17      disableOn: 700,
18      type: 'iframe',
19      mainClass: 'mfp-fade',
20      removalDelay: 160,
21      preloader: false,
22      fixedContentPos: false,
23      disableOn: 300
24    });
25    $("body").each(function () {
26      $(this).find(".img-pop").magnificPopup({
27        type: "image",
28        gallery: {
29          enabled: true
30        }
31      });
32    })
33    //Faq
34    $('.faq--area .faq-title').on('click', function (e) {
35      var element = $(this).parent('.faq--item');
36      if (element.hasClass('open')) {
37        element.removeClass('open');
38        element.find('.faq-content').removeClass('open');
39        element.find('.faq-content').slideUp(300, "swing");
40      } else {
41        element.addClass('open');
42        element.children('.faq-content').slideDown(300, "swing");
43        element.siblings('.faq--item').children('.faq-content').slideUp(300, "swing");
44        element.siblings('.faq--item').removeClass('open');
45        element.siblings('.faq--item').find('.faq-title').removeClass('open');
46        element.siblings('.faq--item').find('.faq-content').slideUp(300, "swing");
47      }
48    });
49    //Menu Dropdown Icon Adding
50    $("ul>li>.submenu").parent("li").addClass("menu-item-has-children");
51    // drop down menu width overflow problem fix
52    $('.submenu').parent('li').hover(function () {
53      var menu = $(this).find("ul");
54      var menupos = $(menu).offset();
55      if (menupos.left + menu.width() > $(window).width()) {
56        var newpos = -$(menu).width();
57        menu.css({
58          left: newpos
59        });
60      }
61    });
62    $('.menu li a').on('click', function (e) {
63      var element = $(this).parent('li');
64      if (element.hasClass('open')) {
65        element.removeClass('open');
66        element.find('li').removeClass('open');
67        element.find('ul').slideUp(300, "swing");
68      } else {
69        element.addClass('open');
70        element.children('ul').slideDown(300, "swing");
71        element.siblings('li').children('ul').slideUp(300, "swing");
72        element.siblings('li').removeClass('open');
73        element.siblings('li').find('li').removeClass('open');
74        element.siblings('li').find('ul').slideUp(300, "swing");
75      }
76    })
77    // Scroll To Top 
78    var scrollTop = $(".scrollToTop");
79    $(window).on('scroll', function () {
80      if ($(this).scrollTop() < 500) {
81        scrollTop.removeClass("active");
82      } else {
83        scrollTop.addClass("active");
84      }
85    });
86    //Click event to scroll to top
87    $('.scrollToTop').on('click', function () {
88      $('html, body').animate({
89        scrollTop: 0
90      }, 500);
91      return false;
92    });
93    //Header Bar
94    $('.header-bar').on('click', function () {
95      $(this).toggleClass('active');
96      $('.overlay').toggleClass('active');
97      $('.menu').toggleClass('active');
98    })
99    $('.overlay').on('click', function () {
100      $(this).removeClass('active');
101      $('.header-bar').removeClass('active');
102      $('.menu').removeClass('active');
103    })
104    // Header Sticky Herevar prevScrollpos = window.pageYOffset;
105    var scrollPosition = window.scrollY;
106    if (scrollPosition >= 1) {
107      $(".header-section").addClass('active');
108    }
109    var header = $(".header-section");
110    $(window).on('scroll', function () {
111      if ($(this).scrollTop() < 1) {
112        header.removeClass("active");
113      } else {
114        header.addClass("active");
115      }
116    });
117    $('.tab ul.tab-menu li').on('click', function (g) {
118      var tab = $(this).closest('.tab'),
119        index = $(this).closest('li').index();
120      tab.find('li').siblings('li').removeClass('active');
121      $(this).closest('li').addClass('active');
122      tab.find('.tab-area').find('div.tab-item').not('div.tab-item:eq(' + index + ')').hide(10);
123      tab.find('.tab-area').find('div.tab-item:eq(' + index + ')').fadeIn(10);
124      g.preventDefault();
125    });
126  });
127})(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.