PageSourceSearch

https://indianchamber.org/assets/js/main.js

js indianchamber.org collected 2026-10-02 16:16:10 UTC 11,256 bytes, 416 lines download raw bytes

1$(document).ready(function(){
2  var currentSize = 16; // base size
3
4  function updateFontSize(){
5    $("body, p, li, a, span, h1, h2, h3, h4, h5, h6").css("font-size", currentSize + "px");
6  }
7
8  $("#up").click(function(){
9    currentSize += 2;
10    updateFontSize();
11  });
12
13  $("#down").click(function(){
14    if(currentSize > 10){
15      currentSize -= 2;
16      updateFontSize();
17    }
18  });
19});
20// Testimonial Slider
21$(document).ready(function () {
22    $("#testimonial-slider").owlCarousel({
23        items: 3,
24        responsive: {
25            1000: { items: 3 },
26            980: { items: 2 },
27            768: { items: 2 },
28            650: { items: 1 }
29        },
30        pagination: true,
31        navigation: false,
32        slideSpeed: 1000,
33        autoplay: true
34    });
35});
36
37// Testimonials Slider
38$(document).ready(function () {
39    $("#testimonials-slider").owlCarousel({
40        items: 8,
41        responsive: {
42            1000: { items: 3 },
43            980: { items: 2 },
44            768: { items: 2 },
45            650: { items: 1 }
46        },
47        pagination: false,
48        navigation: false,
49        slideSpeed: 1000,
50        autoplay: true
51    });
52});
53 
54// Testimonials Slider
55$(document).ready(function () {
56    $("#Icc-Pupblication").owlCarousel({
57        items: 8,
58        responsive: {
59            1000: { items: 3 },
60            980: { items: 2 },
61            768: { items: 2 },
62            650: { items: 1 }
63        },
64        pagination: false,       
65         autoPlay: 3000,
66		dots: true,
67    });
68});
69
70// Left & Right Sliders
71const swiper = new Swiper('.mySwiper', {
72  loop: false,
73  autoplay: {
74    delay: 9000,
75    disableOnInteraction: false,
76  },
77 
78  pagination: {
79    el: '.swiper-pagination',
80    clickable: true,
81  },
82});
83
84
85 // Initialize the Swiper for the right slider
86 var swiperRight = new Swiper('.mySwipers', {
87  slidesPerView: 1, // Number of slides visible at once
88  spaceBetween: 10, // Space between slides
89  loop: true, // Enable looping of slides
90  autoplay: {
91    delay: 5000, // Autoplay interval in milliseconds
92  },
93  pagination: {
94    el: '.swiper-pagination', // Pagination element
95    clickable: true, // Enable pagination clicks
96  },  
97});
98
99
100$('.carousel-testimonia').owlCarousel({
101    loop: true,
102    margin: 0,
103    items: 4,
104    responsiveClass: true,
105    responsive: {
106        0: {
107            items: 1,
108            nav: true
109        },
110        600: {
111            items: 3,
112            nav: false
113        },
114        1000: {
115            items: 3,
116            nav: true,
117            loop: false
118        }
119    },
120    onInitialized: setOwlWrapperLeft,
121    onTranslated: setOwlWrapperLeft
122});
123
124function setOwlWrapperLeft() {
125    // Set the left value of the owl-wrapper
126    $('.carousel-testimonia .owl-wrapper').css('left', '21px');
127}
128$('.carousel-event').owlCarousel({
129     autoPlay: 3000,		
130    margin: 0,
131    items: 4,
132    responsiveClass: true,
133    responsive: {
134        0: {
135            items: 1,
136            nav: true
137        },
138        600: {
139            items: 3,
140            nav: false
141        },
142        1000: {
143            items: 3,
144            nav: true,
145            loop: false
146        }
147    },
148    onInitialized: setOwlWrapperLeft,
149    onTranslated: setOwlWrapperLeft
150});
151
152function setOwlWrapperLeft() {
153    // Set the left value of the owl-wrapper
154    $('.carousel-testimonia .owl-wrapper').css('left', '21px');
155}
156
157
158// Network Slider
159$(document).ready(function () {
160    $('#network-slider').owlCarousel({
161        autoPlay: 3000,		
162        margin: 20,
163        nav: true,
164        items:4,
165        navText: [
166            '<i class="fa fa-angle-left"></i>',
167            '<i class="fa fa-angle-right"></i>'
168        ],
169        dots: false,
170        //autoplay: true,
171        //autoplayTimeout: 5000,
172        //smartSpeed: 800,
173        responsive: {
174            0: { items: 1 },
175            576: { items: 2 },
176            768: { items: 3 },
177            992: { items: 4 }
178        }
179    });
180});
181 $(document).ready(function(){
182    $("#network-slider-2").owlCarousel({
183       autoPlay: 3000,		
184      margin: 20,
185      nav: true,
186      dots: true,      
187      responsive: {
188        0: { items: 1 },
189        576: { items: 2 },
190        768: { items: 3 },
191        992: { items: 4 },
192        1200: { items: 5 }
193      }
194    });
195  });
196//Scroll Percentage
197document.addEventListener("DOMContentLoaded", function () {
198  const scrollPercent = document.querySelector(".scroll-count-percent");
199  const progressCircle = document.querySelector(".progress__value");
200  const percentText = document.querySelector(".percent-number-text");
201  const radius = progressCircle.r.baseVal.value;
202  const circumference = 2 * Math.PI * radius;
203
204  progressCircle.style.strokeDasharray = `${circumference}`;
205  progressCircle.style.strokeDashoffset = `${circumference}`;
206
207  function setProgress(percent) {
208    const offset = circumference - (percent / 100) * circumference;
209    progressCircle.style.strokeDashoffset = offset;
210    percentText.textContent = Math.round(percent);
211  }
212
213  window.addEventListener("scroll", function () {
214    const scrollTop = window.scrollY;
215    const docHeight = document.documentElement.scrollHeight - window.innerHeight;
216    const scrollPercentValue = (scrollTop / docHeight) * 100;
217
218    // Show scroll circle only after some scroll
219    if (scrollTop > 100) {
220      scrollPercent.classList.add("active");
221    } else {
222      scrollPercent.classList.remove("active");
223    }
224
225    setProgress(scrollPercentValue);
226  });
227});
228
229
230  //Go to btn
231  document.addEventListener("DOMContentLoaded", function () {
232    const scrollTopBtn = document.getElementById("btnScrollTop");
233  
234    window.addEventListener("scroll", () => {
235      if (window.scrollY > 150) {
236        scrollTopBtn.classList.remove("d-none");
237      } else {
238        scrollTopBtn.classList.add("d-none");
239      }
240    });
241  
242    scrollTopBtn.addEventListener("click", (e) => {
243      e.preventDefault();
244      window.scrollTo({
245        top: 0,
246        behavior: "smooth"
247      });
248    });
249  });
250
251  //switzeland main crousel
252 $(document).ready(function(){
253  $("#iccCarousel").owlCarousel({
254    items: 1,               
255    loop: true,            
256    autoplay: true,         
257    autoplayTimeout: 1000, 
258       smartSpeed: 800,
259    dots: true,            
260    nav: false              
261  });
262});
263
264  $(document).ready(function(){
265      $('#customFullWidthCarousel').owlCarousel({
266        items: 1,  // or 2, 3 depending on design
267        loop: true,
268        margin: 20,
269        nav: true,
270        dots: true,
271        autoplay: true,
272          autoplayTimeout: 1000, 
273       smartSpeed: 800,
274       
275      });
276    });
277   document.addEventListener('DOMContentLoaded', function () {
278    const currentPage = window.location.pathname.split("/").pop() || "index.html"; // Default to homepage
279
280    // Get all nav links (main and dropdown)
281    const allLinks = document.querySelectorAll('.navbar-nav .nav-link, .navbar-nav .dropdown-item');
282
283    const current_url = document.getElementById('current_url').value;
284
285    allLinks.forEach(link => {
286      const linkHref = link.getAttribute('href');
287      // Match exact page
288      // console.log(linkHref , currentPage , current_url );
289      if (linkHref === currentPage || current_url === linkHref) {
290        link.classList.add('active');
291
292        // If it's a dropdown-item, activate its parent dropdown too
293        const parentDropdownMenu = link.closest('.dropdown-menu');
294        if (parentDropdownMenu) {
295          const parentNavLink = parentDropdownMenu.previousElementSibling;
296          if (parentNavLink && parentNavLink.classList.contains('nav-link')) {
297            parentNavLink.classList.add('active');
298          }
299
300          // Also mark parent nav-item (li)
301          const parentNavItem = parentDropdownMenu.closest('.nav-item');
302          if (parentNavItem) {
303            parentNavItem.classList.add('active');
304          }
305        } else {
306          // For top-level links like Home
307          const parentNavItem = link.closest('.nav-item');
308          if (parentNavItem) {
309            parentNavItem.classList.add('active');
310          }
311        }
312      }
313    });
314  });
315$(document).ready(function () {
316  $('.owl-main-carousel').owlCarousel({
317    loop: true,
318    autoplay: true,
319    autoplayTimeout: 2000, // Time between slides
320    autoplayHoverPause: true, // Pause on hover
321    items: 1,
322    nav: true,
323    dots: true,
324    navText: ["<", ">"],
325    smartSpeed: 800 // Transition speed
326  });
327});
328
329//thumblain-slide
330 const slides = document.querySelectorAll('.thumbslide');
331  const thumbnails = document.querySelectorAll('.thumbnail');
332  const textContainer = document.getElementById('slide-text');
333  let currentIndex = 0;
334
335  function showSlide(index) {
336    if (!slides[index]) return;
337
338    slides.forEach(slide => slide.classList.remove('active'));
339    thumbnails.forEach(thumb => thumb.classList.remove('active'));
340
341    slides[index].classList.add('active');
342    thumbnails[index].classList.add('active');
343
344    const title = slides[index].dataset.title;
345    const link = slides[index].dataset.link;
346
347    //textContainer.innerHTML = `<h1>${title}</h1><a href="${link}" target="_blank">Visit Brand</a>`;
348
349    currentIndex = index;
350  }
351
352  thumbnails.forEach((thumb, index) => {
353    thumb.addEventListener('click', () => showSlide(index));
354  });
355
356  // Optional: Auto-scroll
357  setInterval(() => {
358    let nextIndex = (currentIndex + 1) % slides.length;
359    showSlide(nextIndex);
360  }, 4000); // 4 seconds
361
362  // Scroll thumbnails on arrow click
363  function scrollThumbnails(direction) {
364    const container = document.getElementById('thumbnails');
365    const scrollAmount = 200;
366    container.scrollLeft += direction * scrollAmount;
367  }
368//fade-tata
369 const facts = [
370      {
371        text: "India’s first business history archive, Tata Central Archives, was set up in 1991.",
372        link: "https://www.tata.com/newsroom/heritage/tata-central-archives-art",
373        label: "The Art of Archiving",
374        bg: "#043a5b"
375      },
376      {
377        text: "Jamsetji Tata's Empress Mills, established in 1877, brought ring spindle technology to India.",
378        link: "https://www.tata.com/newsroom/through-the-mill",
379        label: "Through the Mill",
380        bg: "#1ba2f5"
381      },
382      {
383        text: "The Tata group has over 100 operating companies in seven business sectors.",
384        link: "https://www.tata.com/business",
385        label: "Explore Businesses",
386        bg: "#00796b"
387      }
388    ];
389
390 let factIndex = 0;
391
392    function refreshFact() {
393      const factBox = document.getElementById('factBox');
394      const factText = document.getElementById('factText');
395      const factLink = document.getElementById('factLink');
396
397      // Add fade-out
398      factText.classList.add('fade');
399      factLink.classList.add('fade');
400
401      // Wait for fade-out then update content
402      setTimeout(() => {
403        currentIndex = (currentIndex + 1) % facts.length;
404        const current = facts[currentIndex];
405
406        factText.innerHTML = current.text;
407        factLink.innerHTML = current.label;
408        factLink.href = current.link;
409        factBox.style.backgroundColor = current.bg;
410
411        // Fade-in
412        factText.classList.remove('fade');
413        factLink.classList.remove('fade');
414      }, 500);
415    }
416 

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.