PageSourceSearch

https://ulagos.cl/english/wp-content/themes/ulagostemplate/js/portal.js

js ulagos.cl collected 2026-09-24 09:22:25 UTC 3,630 bytes, 124 lines download raw bytes

1$('a.share').on('click', function(e){
2    url = $(this).attr('href');
3    winHeight = 350;
4    winWidth = 500;
5    var winTop = (screen.height / 2) - (winHeight / 2);
6    var winLeft = (screen.width / 2) - (winWidth / 2);
7    window.open( url , 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight);
8    e.preventDefault();
9});
10
11$(".img_boton[aria-expanded='true']").css("background-color", "#42DCA3");
12
13
14
15
16
17// Mantengo el active de los submenus en el li superior para destacar el primer btn 
18
19//$("li.active").parents('li').css("font-weight", "bold");
20
21$("li.active").parents('li').addClass('active');
22
23// con esto creo la clase active dentro de los menus verticales 
24
25
26  var loc = window.location; // encapsulas el objeto location
27  var links = $('.menu li a'); // obtienes todos los links dentro de tu nav
28  var lis = $('.menu li'); // obtienes los objetos lista de tu nav
29
30  // Por cada objeto lista, obtienes su indice de iteración y valor (ignora el valor)
31  lis.each(function(idx, val) {
32    // Si el enlace dentro del array de links es igual al lugar exacto en donde estás
33    // agrega la clase active
34    if (links[idx].href == location.href) { 
35      $(this).addClass('active');
36    }
37
38  });
39// fin Mantengo el active de los submenus en el li superior para destacar el primer btn 
40
41
42
43
44
45//// cambiar a fixed el menu 
46
47
48$(document).ready(function(){
49
50/*
51
52 $('.dropdown').on('show.bs.dropdown', function() {
53    $(this).find('.dropdown-menu').first().stop(true, true).slideDown();
54  });
55
56  // Add slideUp animation to Bootstrap dropdown when collapsing.
57  $('.dropdown').on('hide.bs.dropdown', function() {
58    $(this).find('.dropdown-menu').first().stop(true, true).slideUp();
59  });
60
61*/
62
63
64$(".contenedor--menu").hide();
65
66   $(".icono").click(function() {
67
68    $(".contenedor--menu").animate({
69            width:"toggle",
70                 
71        },{duration:"40000"});
72
73  });   
74
75///// fin animacion facebook lateral
76
77
78var elmnt = document.getElementById("menuprin");
79//var altura = $('.menu1').offset().top;
80  
81  var altura = $('#menuprin').offset().top;
82
83  $(window).on('scroll', function(){
84
85
86
87 if( elmnt.offsetWidth > '1023') {
88
89        if ( $(window).scrollTop() > altura ){
90          //$('.menu1').hide(); //ocultar menu original
91        
92          $('#menuprin').addClass('navbar-fixed-top'); // agrega la clase que vuelve invisible el menu 2
93          $('#menuprin').addClass('transparencia'); // añado clase de transparencia
94         // $( '.navbar-ula' ).css( "background-color", "rgba(0, 174, 239, 0.93)" );
95          //$( '.section2-navbar' ).css( "background-color", "rgba(0, 174, 239, 0.93)" );
96
97          $( '.section3-destacados' ).css( "margin-top", "121px" );
98          $('.section-nav-fixed').css ("margin-top","121px");
99
100         // $('#color0').addClass('color0-fixed'); // agrega la clase que vuelve invisible el menu 2  
101
102        } else { 
103          $('#menuprin').removeClass('navbar-fixed-top'); // agrega la clase que vuelve invisible el menu 2
104          $('#menuprin').removeClass('transparencia'); // Remuevo clase de transparencia
105
106         // $( '.navbar-ula' ).css( "background-color", "#00AEEF" );
107         // $( '.section2-navbar' ).css( "background-color", "#00AEEF" );
108         
109          $( '.section3-destacados' ).css( "margin-top", "auto" );
110          $('.section-nav-fixed').css ("margin-top","auto");
111
112
113          //$('#color0').removeClass('color0-fixed'); // agrega la clase que vuelve invisible el menu 2
114        }
115
116
117  }
118
119      });
120});
121// fin asignanco clases a elementos despues scroll
122
123/// fin cambiar a fixed
124

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.