From ae090d9bc9ac2fe0bfe26582de5116f7b9b7d04a Mon Sep 17 00:00:00 2001 From: Arhell Date: Tue, 11 Oct 2022 00:25:19 +0300 Subject: [PATCH] fix js error --- js/scripts.js | 126 +++++++++++++++++++++++++------------------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/js/scripts.js b/js/scripts.js index f43732fe8..d1f849fc5 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -95,78 +95,78 @@ $(document).ready(function () { // js $(document).ready(function () { - function randomCarousel(id) { - var num = $(id + ' .item').length; - var slide = Math.floor((Math.random() * num)); - $(id + ' .item').each(function (index) { - if (index == slide) { - $(this).addClass('active'); - } else { - $(this).removeClass('active'); - } - }); - } + function randomCarousel(id) { + var num = $(id + ' .item').length; + var slide = Math.floor((Math.random() * num)); + $(id + ' .item').each(function (index) { + if (index == slide) { + $(this).addClass('active'); + } else { + $(this).removeClass('active'); + } + }); + } - randomCarousel('#carousel-tweets'); - randomCarousel('#carousel-companies'); + randomCarousel('#carousel-tweets'); + randomCarousel('#carousel-companies'); - var toc = $('#toc'); - if(toc.length) { - toc.toc({ - 'selectors': 'h2', - 'prefix': 'toc', - 'container': '#page', - 'anchorName': function (i, heading, prefix) { //custom function for anchor name - return $(heading).text().replace(/\s/g, '-').replace(/[^\w-]/g, ''); - }, - }); - } + var toc = $('#toc'); + if (toc.length) { + toc.toc({ + 'selectors': 'h2', + 'prefix': 'toc', + 'container': '#page', + 'anchorName': function (i, heading, prefix) { //custom function for anchor name + return $(heading).text().replace(/\s/g, '-').replace(/[^\w-]/g, ''); + }, + }); + } - var page = $('#page table'); - var tocNext = $('#toc'); - var tocNextUl = $('#toc > ul'); - var tocNextUlLi = $('#toc ul.list li a'); + var page = $('#page table'); + var tocNext = $('#toc'); + var tocNextUl = $('#toc > ul'); + var tocNextUlLi = $('#toc ul.list li a'); - if(page.length) { - page.addClass('table table-striped table-bordered'); - } + if (page.length) { + page.addClass('table table-striped table-bordered'); + } - if(tocNext.length) { - tocNext.toc({ - 'selectors': 'h2,h3,h4', - 'prefix': 'toc', - 'container': '#page', - //custom function for anchor name - 'anchorName': function(i, heading, prefix) { - return $(heading).text().replace(/\s/g, '-').replace(/[^\w-]/g, ''); - }, - }); - } + if (tocNext.length) { + tocNext.toc({ + 'selectors': 'h2,h3,h4', + 'prefix': 'toc', + 'container': '#page', + //custom function for anchor name + 'anchorName': function (i, heading, prefix) { + return $(heading).text().replace(/\s/g, '-').replace(/[^\w-]/g, ''); + }, + }); + } - // List.js - if(tocNextUl.length) { - tocNextUl.addClass('list'); - } + // List.js + if (tocNextUl.length) { + tocNextUl.addClass('list'); + } - if(tocNextUlLi.length) { - tocNextUlLi.addClass('searchitem'); - } + if (tocNextUlLi.length) { + tocNextUlLi.addClass('searchitem'); + } - var options = { - valueNames: [ 'searchitem' ] - }; - var userList = new List('searchable', options); - // end List.js - // docrdy + var options = { + valueNames: ['searchitem'] + }; + var userList = new List('searchable', options); + // end List.js + // docrdy + + // Adding this layout functionality for mobile views with the homepage hero + var navbarToggle = $('.navbar-toggle') + if (navbarToggle.length) { + navbarToggle.click(function () { + $('.row.home').toggleClass('no-padding-top'); + }); + } - // Adding this layout functionality for mobile views with the homepage hero - var navbarToggle = $('.navbar-toggle') - if(navbarToggle.length) { - navbarToggle.click(function(){ - $('.row.home').toggleClass('no-padding-top'); - }); - } -======= function randomCarousel(id) { var num = $(id + ' .item').length; var slide = Math.floor((Math.random() * num)); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy