PageSourceSearch

https://alcaldianeiva.gov.co/SiteAssets/V2/js/accesibilidad.js

js alcaldianeiva.gov.co collected 2026-10-02 13:17:12 UTC 4,856 bytes, 165 lines download raw bytes

1/*Control slider */
2$(function () {
3    $('#myCarousel').carousel({
4      interval: 3000,
5      pause: "false"
6    });
7    $('#pauseButton').show();
8    $('#playButton').hide();
9    $('#myCarousel').carousel('cycle');
10
11    $('#playButton').click(function () {
12      $('#myCarousel').carousel('cycle');
13      $('#playButton').hide();
14      $('#pauseButton').show();
15
16
17    });
18    $('#pauseButton').click(function () {
19      $('#myCarousel').carousel('pause');
20      $('#playButton').show();
21      $('#pauseButton').hide();
22
23
24    });
25  });
26
27  $(function () {
28    $('#nbs-flexisel-inner').carousel({
29      interval: 3000,
30      pause: "false"
31    });
32    $('#pauseButton').show();
33    $('#playButton').hide();
34    $('#myCarousel').carousel('cycle');
35
36    $('#playButton').click(function () {
37      $('#myCarousel').carousel('cycle');
38      $('#playButton').hide();
39      $('#pauseButton').show();
40
41
42    });
43    $('#pauseButton').click(function () {
44      $('#myCarousel').carousel('pause');
45      $('#playButton').show();
46      $('#pauseButton').hide();
47
48
49    });
50  });
51
52  document.getElementById("saltarContenido").addEventListener("click", function() {
53    document.querySelector("#myCarousel").tabIndex = -1;
54    document.querySelector("#myCarousel").focus();
55  });
56  
57  document.getElementById("myCarousel").setAttribute("tabindex", "-1")
58
59            let $imgsCarousel = document.querySelectorAll(
60              "#myCarousel > div > .carousel-item > a"
61            );
62            $imgsCarousel.forEach(el => el.setAttribute("tabindex", "-1"))
63
64            setTimeout(() => {
65              let $iframe = document.querySelector("#twitter-widget-0")
66              $iframe.setAttribute("tabindex", "-1")
67              $iframe.setAttribute("loading", "lazy")
68              $iframe.setAttribute("title", "redes")
69            }, 4000)
70
71            let $imgs = document.querySelectorAll('img');
72            $imgs.forEach(img => {
73              img.setAttribute("tabindex", "-1")
74            })
75
76            let $iconsPatrocionadores = document.querySelectorAll('#patrocinadores > li > a')
77            $iconsPatrocionadores.forEach(el => {
78              el.setAttribute("tabindex", "-1")
79            })
80/*Atributos alt, title y aria-label */
81window.addEventListener('load', function() {
82    console.log("Entre al evento")
83    var images = document.getElementsByTagName('img');
84
85    for (var i = 0; i < images.length; i++) {
86        var img = images[i];
87        if (!img.hasAttribute('alt')) {
88        img.setAttribute('alt', 'Imagen');
89        }
90    }
91});
92
93
94document.addEventListener("DOMContentLoaded", () => {
95    let enlaces = document.querySelectorAll("a");
96    let imagenes = document.querySelectorAll("img");
97    let frames = document.querySelectorAll("iframe");
98
99
100
101    for (let i = 0; i < enlaces.length; i++) {
102        enlaces[i].setAttribute("aria-label", "enlace");
103    }
104
105    for (let i = 0; i < imagenes.length; i++) {
106        if (!imagenes[i].getAttribute("alt") || imagenes[i].getAttribute("alt") == "" || imagenes[i].getAttribute("alt") == " ") {
107            imagenes[i].setAttribute("alt", "imagen");
108        }
109    }
110
111    for (let i = 0; i < frames.length; i++) {
112        frames[i].setAttribute("title", "iframe");
113
114    }
115    let botones = document.querySelectorAll("button");
116    for (let i = 0; i < botones.legth; i++) {
117        botones[i].setAttribute("aria-label", "btn");
118    }
119})
120
121
122/*Ir arriba */
123
124// document.addEventListener("DOMContentLoaded", () => {
125//     // scrool - to top btn
126//     $("#s4-workspace").on("scroll", function () {
127//         // scroll to top btn
128//         if ($("#s4-workspace").scrollTop() >= 400) {
129//             $(".scrollTop").fadeIn(200);
130//         } else {
131//             $(".scrollTop").fadeOut(200);
132//         }
133//     });
134// })
135
136
137
138// document.addEventListener("DOMContentLoaded", () => {
139//     let scroll = document.querySelector(".scrollTop");
140//     scroll.addEventListener("click", () => {
141//         $("#s4-workspace").animate({ scrollTop: 0 }, 200);
142//     })
143// })
144
145
146window.addEventListener("DOMContentLoaded", () => {
147    const $buttonScroll = document.getElementById("scrollUp");
148  
149    window.addEventListener("scroll", () => {
150      let scrollTop = document.documentElement.scrollTop;
151      if (scrollTop > 0) {
152        $buttonScroll.style.transform = "scale(1)";
153      } else {
154        $buttonScroll.style.transform = "scale(0)";
155      }
156  
157      if (scrollTop == 0) $buttonScroll.style.opacity = "1";
158    });
159  
160    $buttonScroll.addEventListener("click", () => {
161      let scrollTop = document.documentElement.scrollTop;
162      if (scrollTop > 0) window.scrollTo(0, 0);
163      $buttonScroll.style.opacity = "0";
164    });
165  });

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.