PageSourceSearch

https://thedentalemporium.uk/assets/js/custom.js

js thedentalemporium.uk collected 2026-10-05 23:50:29 UTC 3,685 bytes, 145 lines download raw bytes

1window.onload = function() {
2  AOS.init({
3    // disable:'mobile',
4        easing: 'ease',
5         duration: 1000,
6         once: true,
7      }); 
8
9    // breadcum parallax and sectioon parallax 
10
11    var width=$(window).width();
12    if (width > 767) {
13      $('.breadcum').parallax_content(); 
14      $('.parallax').parallax(); 
15    } else {
16      $("header").addClass("shrink");
17    }
18  }
19
20$(document).ready(function(argument) {
21  //active menu navigation
22  var loc = window.location.pathname;
23  var page = location.pathname.split('/').pop();
24  $('.mobile-navbar ul.navbar-active li  a[href*="'+page+'"]').addClass('active');
25  $('.mobile-navbar ul.navbar-nav li  a.project-active[href*="'+page+'"]').addClass('active');
26
27  var loc = window.location.pathname;
28  var page = location.pathname.split('/').pop();
29  if(page=='') {
30    page = 'index.php';
31  }
32
33  if($('a[href*="'+page+'"]').parents().hasClass('dropdown-menu')) {
34    
35    $('a[href*="'+page+'"]').parents('.dropdown').find('a:first').addClass('active');
36  }
37  else {
38    $('a[href*="'+page+'"]').addClass('active');
39  }
40});
41
42
43// //cross icon header navigation 
44
45$('#mobile-menu-action').click(function() {
46  if($('.mobile-navbar').hasClass('open')) {
47    $('.mobile-navbar').removeClass('open');
48    $(this).removeClass('active');
49  }
50  else {
51    $('.mobile-navbar').addClass('open');
52    $(this).addClass('active');
53  }
54});
55
56$(document).on('click','.mobile-navbar',function() {
57  $('#mobile-menu-action').trigger('click');
58});
59
60// // header shrink js
61
62$(document).on("scroll", function(){
63  var width=$(window).width();
64  if (width > 767) {
65    if($(document).scrollTop() > 100) {
66      $("header").addClass("shrink");
67    } else {
68      $("header").removeClass("shrink");
69    }
70  } else {
71    if($(document).scrollTop() > 100) {
72      $("header").addClass("active");
73    } else {
74      $("header").removeClass("active");
75    }
76  }
77});
78
79// AOS.init();
80// <--------------- top arrow --------------------->
81$(document).on("scroll", function() {
82  if ($(document).scrollTop() > 800) {
83    $(".top-arrow").show();
84  } else {
85    $(".top-arrow").hide();
86  }
87});
88
89$(document).on('click','.top-arrow', function() {
90  $("html, body").animate({ scrollTop: 0 }, 50);
91});
92
93
94// smooth scroll hash click
95   // var hash=window.location.hash;
96   //  var ele=$('.nav-tabs a[href="'+hash+'"][data-toggle="tab"]');
97   //  var ele_top=$('.tab-content');
98   //  if(ele.length > 0) {
99   //    $(ele).trigger('click');
100   //    $("html, body").animate({ scrollTop: $(ele_top).offset().top - ($('.breadcum').height() - 50) }, 1000);
101   //  }
102    
103$( window ).on('hashchange', function() {
104  var hash = window.location.hash;
105  if (hash!='') {
106    $('html, body').animate({
107      scrollTop:$(hash).offset().top - ($('header').height() - 80)}, 1000);
108  }
109});
110
111             // home-slider
112
113// counter js animation script start 
114function formatter (value) {
115  return value.toFixed(0).replace(/\B(?=(?:\d{3})+(?!\d))/g, ',');
116}
117
118var a = 0;
119$(window).scroll(function() {
120  if($('.counter').length > 0) {
121    var oTop = $('.counter').offset().top - window.innerHeight;
122    if (a == 0 && $(window).scrollTop() > oTop) {
123      $('.counter-value').each(function() {
124        var $this = $(this),
125        countTo = $this.attr('data-count');
126        $({
127          countNum: $this.text()
128        }).animate({
129          countNum: countTo
130        },
131        {
132          duration: 2000,
133          easing: 'swing',
134          step: function() {
135            $this.text(formatter(Math.floor(this.countNum)));
136          },
137          complete: function() {
138            $this.text(formatter(this.countNum));
139          }
140        });
141      });
142      a = 1;
143    }
144  }
145});

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.