PageSourceSearch

https://aftabir.com/assets/front/js/custom.js

js aftabir.com collected 2026-10-01 11:44:12 UTC 4,603 bytes, 160 lines download raw bytes

1$(document).ready(function() {
2    $('nav').coreNavigation({
3        menuPosition: "right",
4        container: false,
5        mode: 'sticky',
6        dropdownEvent: 'click',
7        onInit: function(){
8            $('ul.tabs > li > a').click(function(e){
9                e.preventDefault();
10                var tab_id = $(this).closest('li.tab-link').attr('data-tab');
11
12                $('ul.tabs li').removeClass('active');
13                $('.tab-content').removeClass('active');
14
15                $(this).closest('li.tab-link').addClass('active');
16                $("#"+tab_id).addClass('active');
17            })
18        },
19        onOpenMegaMenu: function(){
20            console.log('Open Megamenu');
21        },
22        onCloseMegaMenu: function(){
23            console.log('Close Megamenu');
24        }
25
26    });
27});
28
29
30$(document).ready(function() {
31    $('.slider-hero').slick({
32        infinite: true,
33        slidesToShow: 5,
34        slidesToScroll: 1,
35        autoplay: true,
36        autoplaySpeed: 2000,
37        arrows: false,
38        centerMode: false
39    });
40});
41
42$(document).ready(function() {
43    $('.slider-knowmore').slick({
44        infinite: true,
45        slidesToShow: 4,
46        slidesToScroll: 4,
47        rows: 3,
48        autoplay: true,
49        autoplaySpeed: 2000,
50        arrows: false,
51        centerMode: false,
52        dots: true
53    });
54});
55
56
57$(document).ready(function () {
58    $('ul.multimedia-nav > li').click(function (e) {
59        $('ul.multimedia-nav > li > button').removeClass('active-orange');
60        $(this).children('button').addClass('active-orange');
61    });
62});
63
64$(document).ready(function () {
65    $('ul.nav-pills-orange li').click(function (e) {
66        $('ul.nav-pills-orange li button').removeClass('active-orange active');
67        $(this).children('button').addClass('active-orange');
68    });
69});
70
71$(document).ready(function () {
72    $('ul.nav-pills-outline-orange > li').click(function (e) {
73        $('ul.nav-pills-outline-orange > li > button').removeClass('active-outline-orange active');
74        $(this).children('button').addClass('active-outline-orange');
75    });
76});
77
78$(document).ready(function () {
79    $('.tabs-orange > a').click(function (e) {
80        $('.tabs-orange > a').removeClass('active-orange active');
81        $(this).addClass('active-orange');
82    });
83});
84
85$(document).ready(function () {
86    $('.news-trapezoid-tabs > a:nth-child(1)').click(function (e) {
87        let thisOne = $(this).parent().children();
88
89        thisOne.eq(1).removeClass('trapezoid-right').addClass('trapezoid-left');
90        thisOne.eq(2).children().removeClass('text-white').addClass('text-black');
91        thisOne.eq(0).children().removeClass('text-black').addClass('text-white');
92    });
93    $('.news-trapezoid-tabs > a:nth-child(3)').click(function (e) {
94        let thisOne = $(this).parent().children();
95
96        thisOne.eq(1).removeClass('trapezoid-left').addClass('trapezoid-right');
97        thisOne.eq(2).children().removeClass('text-black').addClass('text-white');
98        thisOne.eq(0).children().removeClass('text-white').addClass('text-black');
99    });
100});
101
102$(document).ready(function() {
103    $('.news-slider-js').slick({
104        dots: true,
105        infinite: true,
106        slidesToShow: 4,
107        speed: 1000,
108        slidesToScroll: 1,
109        autoplay: true,
110        autoplaySpeed: 2000,
111        centerMode: true,
112    });
113});
114
115
116function showPassword(y) {
117    let x = document.getElementById("password");
118    if (x.type === "password") {
119        x.type = "text";
120        y.firstChild.className = "fa-regular fa-eye-slash";
121    } else {
122        x.type = "password";
123        y.firstChild.className = "fa-regular fa-eye";
124    }
125}
126
127
128
129const inputElements = [...document.querySelectorAll('input.login-ls-verifyCode')]
130
131inputElements.forEach((ele,index)=>{
132    ele.addEventListener('keydown',(e)=>{
133        if(e.keyCode === 8 && e.target.value==='') inputElements[Math.max(0,index-1)].focus()
134    })
135    ele.addEventListener('input',(e)=>{
136        const [first,...rest] = e.target.value
137        e.target.value = first ?? ''
138        if(index!==inputElements.length-1 && first!==undefined) {
139            inputElements[index+1].focus()
140            inputElements[index+1].value = rest.join('')
141            inputElements[index+1].dispatchEvent(new Event('input'))
142        }
143    })
144});
145
146
147
148
149$(document).ready(function() {
150    $('.news-show-slider-js').slick({
151        dots: true,
152        infinite: true,
153        arrows: true,
154        speed: 1000,
155        slidesToShow: 5,
156        slidesToScroll: 1,
157        autoplay: true,
158        autoplaySpeed: 2000,
159    });
160});

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.