1function getFiltros(clave) { 2 var resultado = ''; 3 4 if(jQuery('[data-filtro="' + clave + '"]').length>jQuery('[data-filtro="' + clave + '"]:checked').length){ 5 jQuery('[data-filtro="' + clave + '"]:checked').each(function () { 6 resultado += '_' + jQuery(this).val(); 7 }); 8 } 9 return resultado; 10} 11var esmovil = false; 12var flickitys = []; 13 14(function($) { 15 var lastScrollTop = 0; 16 17 function botonGrupos(obj){ 18 $('tr').removeClass('activado'); 19 obj.parents('tr').addClass('activado'); 20 $('.btn-grupo-lista,.btn-grupo-link').hide(); 21 if(obj.data('tipo')=='abierto'){ 22 $('.btn-grupo-link').show().attr('href',obj.data('url')); 23 24 } 25 if(obj.data('tipo')=='lista'){ 26 $('.btn-grupo-lista[data-cont="' + obj.data('cont')+ '"]').show(); 27 } 28 } 29 30 $(window).on('load', function () { 31 32 flickeriza(); 33 34 botonGrupos($('input[type=radio][name=grupo]:checked')) 35 36 $('input[type=radio][name=grupo]').on('change', function(){ 37 botonGrupos($(this)); 38 }); 39 40 if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { esmovil=true; $('html').addClass('mobile-device'); } 41 42 $('.btn-menu').click(function() { $('html').toggleClass('active-menu').removeClass('active-menu-masters'); }); 43 $('.btn-menu-masters').click(function() { $('html').toggleClass('active-menu-masters'); }); 44 45 $('button[data-tab]').click(function() { 46 var layer = $(this).attr('data-tab'); 47 $('[data-tab]').removeClass('active'); 48 $('[data-tab='+layer+']').addClass('active'); 49 $('[data-tab='+layer+']').find('[data-flick]').flickity('destroy').data('flickity-activo', false); 50 flickeriza(); 51 }); 52 53 $('a[data-layer], button[data-layer], .content-poppup-bg[data-layer]').click(function() { 54 var layer = $(this).attr('data-layer'); 55 $('[data-layer='+layer+']').toggleClass('active'); 56 return false; 57 }); 58 59 $('.btn-search-close').on('click', function(){ 60 $('[data-layer=search]').removeClass('active'); ASP.api(1, "closeResults"); 61 }); 62 $('[data-ver]').find('a').on('click', function() {if(esmovil){$('button[data-ver]').removeClass('active'); $(this).parents('[data-ver]').slideUp();}}); 63 64 65 $('.content-autor button').click(function() { 66 $(this).parents('.content-autor').toggleClass('active'); 67 }); 68 69 $('button[data-ver]').click(function() { 70 var obj = $(this).attr('data-ver'); 71 $(this).toggleClass('active'); 72 $('div[data-ver='+obj+']').slideToggle(); 73 }); 74 75 $('button[data-layer=search]').click(function() { $('.header-search input').focus(); }); 76 77 $('.menu-main a + ul').parents('li').addClass('has-childs'); 78 79 $('.menu-main a + ul').parents('li').click(function() { 80 $(this).toggleClass('expand'); 81 }); 82 83 $('.has-childs').mouseenter(function() { $(this).parents('.menu-main').addClass('enter'); }).mouseleave(function() { $(this).parents('.menu-main').removeClass('enter'); }); 84 85 $('a[data-goto], button[data-goto]').click(function() { 86 var destino = $(this).attr('data-goto'); 87 var objscroll = $('html, body'); 88 var sumaaltura = 100; 89 $('[data-goto]').removeClass('active'); 90 $(this).addClass('active'); 91 objscroll.animate({ scrollTop: $('.content-mods[data-goto='+destino+']').offset().top - sumaaltura + 'px'}, 400); 92 return false; 93 }); 94 95 $('.content-mod-slider').flickity({ cellAlign: 'left', contain: true, groupCells: true, pageDots: false, adaptiveHeight: true }); 96 $('.content-mod-slider.content-mod-slider-small, .content-mod-slider.content-mod-slider-dicen').flickity({ cellAlign: 'left', contain: true, groupCells: true, pageDots: false, adaptiveHeight: false }); 97 $('.content-second .content-mod-slider.content-mod-slider-dicen').flickity({ cellAlign: 'left', contain: true, groupCells: true, pageDots: false, adaptiveHeight: true }); 98 99 $(".content-mod-acordeon button:not(.btn-filtrar-cursos-modulo)").click(function() { 100 $(this).toggleClass('active'); 101 $(this).siblings('.content-mod-acordeon-txt').slideToggle(); 102 }); 103 104 $(".content-mod-acordeon-semi button").click(function() { 105 $(this).toggleClass('active'); 106 $(this).siblings('.content-mod-acordeon-txt').toggleClass('active'); 107 }); 108 109 $("button[data-mas], header[data-mas]").click(function() { 110 var layer = $(this).attr('data-mas'); 111 $('[data-mas='+layer+']').toggleClass('active'); 112 $('div[data-mas='+layer+']').slideToggle(); 113 }); 114 115 var filtroActivo; 116 $('.lnkFiltroClaustro').click(function(){ 117 //console.log(filtroActivo); 118 if($(this).data('claustro')=='*'){ 119 $('.lnkFiltroClaustro').addClass('active'); 120 $(this).removeClass('active'); 121 $('.itemDocente').attr('data-visible','visible').show(); 122 return false;
123 } 124 125 if($(this).data('claustro')==filtroActivo){ 126 filtroActivo = '' 127 $('.lnkFiltroClaustro').addClass('active'); 128 $('.lnkFiltroClaustro[data-claustro="*"]').removeClass('active'); 129 $('.itemDocente').attr('data-visible','visible'); 130 }else{ 131 filtroActivo = $(this).data('claustro'); 132 $('.lnkFiltroClaustro').addClass('active'); 133 $(this).removeClass('active'); 134 $('.itemDocente').attr('data-visible','oculto'); 135 $('.itemDocente[data-claustro*="' + filtroActivo + '"]').attr('data-visible','visible'); 136 } 137 $('.itemDocente[data-visible="oculto"]').hide(); 138 $('.itemDocente[data-visible="visible"]').show(); 139 return false; 140 }); 141 142 $('.btn-copiar').click(function(){ 143 var copyText = document.getElementById("link_rrss"); 144 copyText.select(); 145 copyText.setSelectionRange(0, 99999); 146 document.execCommand("copy"); 147 $('.txt-confirmacion').fadeIn(); setTimeout(function(){$('.txt-confirmacion').fadeOut();},1500); 148 }); 149 150 /* 151 $('.btn-inscribirse, .btn-inscripcion-curso').on("click",function(){ 152 var objscroll = $('html, body'); 153 var sumaaltura = 100; 154 objscroll.animate({ scrollTop: $('.content-grupos').offset().top - sumaaltura + 'px'}, 400); 155 return false; 156 }); 157 */ 158 159 /* GA4 */ 160 161 $('.itemCurso').find('a').on("click", function () { 162 var obj = $(this).parents('.itemCurso'); 163 var padre = $(this).parents('.padre-listado-cursos'); 164 var orden = $(padre).find('.itemCurso').index(obj); 165 166 window.dataLayer = window.dataLayer || []; 167 dataLayer.push({ ecommerce: null }); 168 window.dataLayer.push({ 169 event: 'select_item', 170 ecommerce: { 171 items: [{ 172 item_name: obj.data('nombre'), // nombre del producto 173 item_id: obj.data('idcurso'), // ID de curso 174 price: '"' + obj.data('precio') + '"', // precio de producto. No incluir código de moneda. 175 item_category: obj.data('plan'), // plan de estudios del curso principal 176 item_category2: obj.data('modalidad'), // modalidad: Online, Presencial, Videoconferencia, Máster, etc. 177 item_list_name: padre.data('listname'), //insertar el nombre de la lista en la que se muestra el producto 178 item_list_id: padre.data('listid'), //insertar el ID de la lista en la que se muestra el producto 179 index: orden+1, //insertar posición del producto en la lista 180 quantity: '1' //cantidad de producto 181 }] 182 } 183 }); 184 185 console.log({ 186 event: 'select_item', 187 ecommerce: { 188 items: [{ 189 item_name: obj.data('nombre'), // nombre del producto 190 item_id: obj.data('idcurso'), // ID de curso 191 price: '"' + obj.data('precio') + '"', // precio de producto. No incluir código de moneda. 192 item_category: obj.data('plan'), // plan de estudios del curso principal 193 item_category2: obj.data('modalidad'), // modalidad: Online, Presencial, Videoconferencia, Máster, etc. 194 item_list_name: padre.data('listname'), //insertar el nombre de la lista en la que se muestra el producto 195 item_list_id: padre.data('listid'), //insertar el ID de la lista en la que se muestra el producto 196 index: orden+1, //insertar posición del producto en la lista 197 quantity: '1' //cantidad de producto 198 }] 199 } 200 }); 201 202 //return false; 203 204 205 }); 206 207 $('input[name="chk-aceptacion"]').on('change', function(e){var obj = $(this); 208 if(obj.is(":checked")){ 209 Cookiebot.submitCustomConsent(Cookiebot.consent.preferences, Cookiebot.consent.statistics, true, false);} 210 }); 211 212 document.addEventListener( 'wpcf7submit', function( event ) { 213 214 setTimeout(function() { 215 $([document.documentElement, document.body]).animate({ 216 scrollTop: $(".wpcf7-response-output").offset().top - 200 217 }, 500); 218 }, 500); 219 if(event.detail.status=='mail_sent'){ 220 window.dataLayer = window.dataLayer || []; 221 window.dataLayer.push({ 222 'event': 'generate_lead', 223 'form_name': formularios.find( formulario => formulario.id === event.detail.contactFormId ).titulo 224 }); 225 console.log('generate_lead'); 226 } 227 else{ 228 window.dataLayer = window.dataLayer || []; 229 window.dataLayer.push ({ 230 event: 'tracked_error', 231 form_name: formularios.find( formulario => formulario.id === event.detail.contactFormId ).titulo, 232 error_type: 'Form', 233 error_message: event.detail.status 234 }); 235 console.log('tracked_error'); 236 } 237 }, false ); 238 }); 239 240 $(window).on('scroll', function() { 241 var windowtop = $(window).scrollTop(); 242 // if (windowtop > lastScrollTop){ if ( $(window).scrollTop() > ( $('.content-header').outerHeight() + $('.header').outerHeight() ) ) { $('.header-resume, .btn-inscribirse').addClass('scroll-down');} } 243 if ( $(window).scrollTop() > ( ($('.content-header').outerHeight() + $('.header').outerHeight()) || $('.content-full').outerHeight() + $('.header').outerHeight() ) ) { $('.header-resume, .btn-inscribirse, .content-filtros').addClass('scroll-down');} 244 else { $('.header-resume, .btn-inscribirse, .content-filtros').removeClass('scroll-down'); } 245 /* 246 if ( $(window).scrollTop() > ( $('.content-full').outerHeight() + $('.header').outerHeight() ) ) { $('.header-resume, .btn-inscribirse, .content-filtros').addClass('scroll-down');} 247 else { $('.header-resume, .btn-inscribirse, .content-filtros').removeClass('scroll-down'); } 248 */ 249 250 lastScrollTop = windowtop; 251 var grupoVisible=1; 252 $('[data-goto]').each(function(){ 253 //console.log($(this).offset().top + ' â ' + $(window).scrollTop()); 254 if($(window).scrollTop()+150>$(this).offset().top&&$(window).scrollTop()+150<$(this).offset().top+$(this).outerHeight()){ 255 if($(this).attr('data-goto')!=grupoVisible){ 256 grupoVisible = $(this).attr('data-goto'); 257 $('a[data-goto]').removeClass('active'); 258 $('a[data-goto="'+ grupoVisible +'"]').addClass('active'); 259 } 260 //console.log('es visible el grupo ' + $(this).attr('data-goto') ); 261 } 262 }); 263 }); 264 265 266 function flickeriza(){ 267 var ww = $(window).width(); 268 $('[data-flick]').each(function(){ 269 var obj = $(this); 270 var n = obj.find('.item').length; 271 var $carousel; 272 if(ww<=1020){ 273 if((obj.data('flick')=='all'||obj.data('flick')=='mobile')&&!obj.data('flickity-activo')){ 274 $carousel = obj.flickity({ cellAlign: 'left', groupCells: true, pageDots: false }); 275 obj.data('flickity-activo', true); 276 } 277 if(obj.data('flick')=='desktop'&&obj.data('flickity-activo')){ 278 obj.flickity('destroy'); obj.data('flickity-activo', false); 279 } 280 }else{ 281 if((obj.data('flick')=='all'||obj.data('flick')=='desktop')&&!obj.data('flickity-activo')){ 282 $carousel = obj.flickity({ cellAlign: 'left', groupCells: true, pageDots: false }); 283 obj.data('flickity-activo', true); 284 } 285 if(obj.data('flick')=='mobile'&&obj.data('flickity-activo')){ 286 obj.flickity('destroy'); obj.data('flickity-activo', false); 287 } 288 289 } 290 }); 291 } 292 293 $(window).on('resize', function(){ 294 flickeriza(); 295 }); 296 297})(jQuery);
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.