PageSourceSearch

https://gigahertzgiveaways.co.uk/wp-content/themes/zap-competitions-theme/assets/js/script.js?ver=2.5.9

js gigahertzgiveaways.co.uk collected 2026-10-08 00:07:32 UTC 3,236 bytes, 125 lines download raw bytes

1jQuery(function ($) {
2  "use strict";
3
4  if (navigator.userAgent.indexOf("gonative") > -1) {
5    document.body.classList.add("app-user");
6  }
7
8  if (typeof $(".dob_mask").mask === "function") {
9    $(".dob_mask").mask("00-00-0000");
10  }
11
12  $("[data-toggle=\"offcanvas\"]").on("click", function () {
13    $(".offcanvas-collapse").toggleClass("open");
14  });
15
16  $("#navbar-toggler").on("click", function () {
17    $(".offcanvas-collapse").toggleClass("open");
18  });
19
20  // inspired by http://jsfiddle.net/arunpjohny/564Lxosz/1/
21  $(".table-responsive-stack").each(function (i) {
22    var id = $(this).attr("id");
23    //alert(id);
24    $(this).find("th").each(function (i) {
25      $("#" + id + " td:nth-child(" + (i + 1) + ")").prepend("<span class=\"table-responsive-stack-thead\">" + $(this).text() + ":</span> ");
26      //$('.table-responsive-stack-thead').hide()
27
28    });
29
30    var thCount = $(this).find("th").length;
31    var rowGrow = 100 / thCount + "%";
32    //console.log(rowGrow);
33    $(this).find("th, td").css("flex-basis", rowGrow);
34
35  });
36
37  function flexTable () {
38    if ($(window).width() < 768) {
39
40      $(".table-responsive-stack").each(function (i) {
41        $(this).find(".table-responsive-stack-thead").show();
42        $(this).find("thead").hide();
43      });
44
45      // window is less than 768px
46    } else {
47
48      $(".table-responsive-stack").each(function (i) {
49        $(this).find(".table-responsive-stack-thead").hide();
50        $(this).find("thead").show();
51      });
52
53    }
54// flextable
55  }
56
57  flexTable();
58
59  window.onresize = function (event) {
60    flexTable();
61  };
62
63  // Winners Carousel
64
65  // store the slider in a local variable
66  let $window = $(window),
67    flexslider = { vars: {} },
68    $slider = jQuery("#zapct-homepage-winners-slider");
69
70  // tiny helper function to add breakpoints
71  function getGridSize () {
72
73    let desktop = $slider.data("desktop-items"),
74      tablet = $slider.data("tablet-items"),
75      mobile = $slider.data("mobile-items");
76
77    return (window.innerWidth < 786) ? mobile :
78      (window.innerWidth < 992) ? tablet : desktop;
79  }
80
81  $window.load(function () {
82    $slider.flexslider({
83      selector: ".slides > div",
84      animation: "slide",
85      animationLoop: true,
86      itemWidth: 210,
87      itemMargin: 5,
88      controlNav: $slider.data("dots"),
89      directionNav: $slider.data("arrows"),
90      minItems: getGridSize(), // use function to pull in initial value
91      maxItems: getGridSize(), // use function to pull in initial value
92      start: function (slider) {
93        flexslider = slider;
94      }
95    });
96  });
97
98  // check grid size on resize event
99  $window.resize(function () {
100    var gridSize = getGridSize();
101
102    flexslider.vars.minItems = gridSize;
103    flexslider.vars.maxItems = gridSize;
104  });
105
106// document ready
107});
108
109jQuery(window).load(function () {
110
111  let testimonials = jQuery(".zapct-testimonials");
112
113  if (testimonials.length) {
114    testimonials.flexslider({
115      animation: "slide",
116      manualControls: ".zapct-testimonials-controls .zapct-testimonials-control",
117      useCSS: false, /* Chrome fix*/
118      slideshowSpeed: 4000,
119      start: function () {
120        jQuery(".zapct-testimonials .slides").addClass("ready");
121      },
122    });
123  }
124
125});

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.