1//detectar altura div 2 3//document.addEventListener("DOMContentLoaded", function() { 4 5window.onload = function() { 6 // Variable para almacenar la altura original 7 var alturaOriginal = 0; 8 9 // Función para detectar la altura y actualizar el padding-top 10 function detectarYActualizarPadding() { 11 var alturaDiv1 = $('.fixed-header').height(); 12 if (alturaOriginal === 0) { 13 alturaOriginal = alturaDiv1; 14 } 15 var nuevoPaddingTop = alturaOriginal + 'px'; 16 $('body').css('padding-top', nuevoPaddingTop); 17 console.log('Altura del div1: ' + alturaDiv1); 18 } 19 20 // Llamar a la función al cargar la página y al redimensionar la ventana 21 detectarYActualizarPadding(); 22 $(window).resize(detectarYActualizarPadding); 23}; 24 25 26 27//var base_url = window.location.origin+'/'; 28var base_url = window.location.origin+'/'; 29 30$(function () { 31 $('.preloader, .black-screen').fadeOut('fast'); 32}); 33 34$.fn.extend({ 35 toggleText: function(a, b){ 36 return this.text(this.text() == b ? a : b); 37 } 38}); 39 40$( "#buscador-header" ).click(function() { 41 $( ".buscador-header" ).toggle( "slow", function() { 42 // Animation complete. 43 }); 44}); 45 46$( ".mostrar-categoria" ).click(function() { 47 $( ".categoria-mostrar" ).toggle( "slow", function() { 48 $(".mostrar-categoria span").toggleText('Mostrar categorias', 'Ocultar categorias'); 49 }); 50}); 51 52$( document ).ready(function() { 53 // $(".dropdown-trigger").dropdown(); 54 55 //to set progress-bar for whole page 56 progressJs().start().set(100); 57 58 // Ticker 59 $('.webTicker').webTicker({ 60 duplicate:true, 61 startEmpty:false, 62 hoverpause:true 63 }); 64 $('.wrapper-ticker').css( "visibility", "visible" ); 65 66 // Paralax 67 $('.parallax').parallax({ responsiveThreshold: 480 }); 68 69 // Form Select Custom 70 $('select').formSelect(); 71 72 // Tabs 73 $('.tabs').tabs(); 74 75 // Acordión 76 $('.collapsible').collapsible(); 77 78 // Modal 79 $('.modal').modal(); 80 $('.modal-auto').modal('open'); 81 82 // Side Nav 83 $('.sidenav').sidenav(); 84 85 // Menu Fixed 86 //menu_fixed('.sec-menu-top-fixed.home'); 87 88 //animar_ancla_form(); 89 90 /* 91 $('.demo').slick({ 92 arrows: false, 93 infinite: false, 94 dots: true 95 }); 96 */ 97 98 99 /* Slider - Home */ 100 $('.slider-responsive-1').slick({ 101 adaptiveHeight: true, 102 //dots: true, 103 //fade: true, 104 arrows: false, 105 autoplay: true, 106 speed: 1300, 107 autoplaySpeed: 4000, 108 pauseOnHover: false, 109 110 responsive: [ 111 { 112 breakpoint: 1024, 113 settings: { 114 115 } 116 }, 117 { 118 breakpoint: 720, 119 settings: { 120 121 } 122 }, 123 { 124 breakpoint: 600, 125 settings: { 126 127 } 128 }, 129 { 130 breakpoint: 480, 131 settings: { 132 slidesToShow: 1, 133 slidesToScroll: 1, 134 //autoplay: false, 135 } 136 } 137 ] 138 }); 139 140 /* Slider - Home */ 141 $('.slider-publicidad-1').slick({ 142 adaptiveHeight: true, 143 //dots: true, 144 fade: true, 145 arrows: false, 146 autoplay: true, 147 speed: 1300, 148 autoplaySpeed: 7000, 149 pauseOnHover: false, 150 151 responsive: [ 152 { 153 breakpoint: 1024, 154 settings: { 155 156 } 157 }, 158 { 159 breakpoint: 720, 160 settings: { 161 162 } 163 }, 164 { 165 breakpoint: 600, 166 settings: { 167 168 } 169 }, 170 { 171 breakpoint: 480, 172 settings: { 173 slidesToShow: 1, 174 slidesToScroll: 1, 175 autoplay: true, 176 } 177 } 178 ] 179 }); 180 181 182 /* Slider - Noticias */ 183 $('.slider-responsive-2').slick({ 184 adaptiveHeight: true, 185 dots: true, 186 arrows: false, 187 infinite: false, 188 slidesToShow: 3, 189 slidesToScroll: 1, 190 responsive: [ 191 { 192 breakpoint: 1024, 193 settings: { 194 slidesToShow: 2, 195 slidesToScroll: 1 196 } 197 }, 198 { 199 breakpoint: 720, 200 settings: { 201 dots: true, 202 slidesToShow: 2, 203 slidesToScroll: 1 204 } 205 }, 206 { 207 breakpoint: 600, 208 settings: { 209 dots: true, 210 slidesToShow: 1, 211 slidesToScroll: 1 212 } 213 }, 214 { 215 breakpoint: 480, 216 settings: { 217 dots: true, 218 slidesToShow: 1, 219 slidesToScroll: 1 220 } 221 } 222 ] 223 }); 224 225 226 227 /* Slider - Videos */ 228 $('.slider-responsive-3').slick({ 229 adaptiveHeight: true, 230 dots: false, 231 arrows: true, 232 infinite: false, 233 slidesToShow: 3, 234 slidesToScroll: 1, 235 swipeToSlide: true, 236 responsive: [ 237 { 238 breakpoint: 1023, 239 settings: { 240 slidesToShow: 3, 241 slidesToScroll: 1, 242 variableWidth: true 243 } 244 }, 245 { 246 breakpoint: 900, 247 settings: { 248 dots: false, 249 slidesToShow: 3, 250 slidesToScroll: 1 251 } 252 }, 253 { 254 breakpoint: 600, 255 settings: { 256 dots: false, 257 slidesToShow: 3, 258 slidesToScroll: 1 259 } 260 }, 261 { 262 breakpoint: 480, 263 settings: { 264 dots: false, 265 slidesToShow: 1, 266 slidesToScroll: 1 267 } 268 } 269 ] 270 }); 271 272 /* Slider - Videos */ 273 $('.slider-responsive-3-2').slick({ 274 adaptiveHeight: true, 275 dots: false, 276 autoplay: true, 277 arrows: true, 278 infinite: false, 279 slidesToShow: 5, 280 slidesToScroll: 1, 281 swipeToSlide: true, 282 responsive: [ 283 { 284 breakpoint: 1023, 285 settings: { 286 slidesToShow: 3, 287 slidesToScroll: 1, 288 variableWidth: true 289 } 290 }, 291 { 292 breakpoint: 900, 293 settings: { 294 dots: false, 295 slidesToShow: 3, 296 slidesToScroll: 1 297 } 298 }, 299 { 300 breakpoint: 600, 301 settings: { 302 dots: false, 303 slidesToShow: 3, 304 slidesToScroll: 1 305 } 306 }, 307 { 308 breakpoint: 480, 309 settings: { 310 dots: false, 311 slidesToShow: 1, 312 slidesToScroll: 1 313 } 314 } 315 ] 316 }); 317 318 /* Slider - Canales */ 319 $('.slider-responsive-4').slick({ 320 adaptiveHeight: true, 321 dots: false, 322 arrows: true, 323 infinite: false, 324 slidesToShow: 4, 325 slidesToScroll: 1, 326 autoplay: true, 327 speed: 1200, 328 autoplaySpeed: 8000, 329 swipeToSlide: true, 330 responsive: [ 331 { 332 breakpoint: 1023, 333 settings: { 334 slidesToShow: 5, 335 slidesToScroll: 1, 336 variableWidth: true 337 } 338 }, 339 { 340 breakpoint: 900, 341 settings: { 342 dots: false, 343 slidesToShow: 3, 344 slidesToScroll: 1 345 } 346 }, 347 { 348 breakpoint: 600, 349 settings: { 350 dots: false, 351 slidesToShow: 3, 352 slidesToScroll: 1 353 } 354 }, 355 { 356 breakpoint: 480, 357 settings: { 358 dots: false,
359 arrows: false, 360 autoplay: false, 361 slidesToShow: 3, 362 slidesToScroll: 1 363 } 364 } 365 ] 366 }); 367 368 /* Slider - Canales */ 369 $('.slider-responsive-4-2').slick({ 370 adaptiveHeight: true, 371 dots: false, 372 arrows: true, 373 infinite: false, 374 slidesToShow: 4, 375 slidesToScroll: 1, 376 autoplay: true, 377 speed: 1200, 378 autoplaySpeed: 8000, 379 swipeToSlide: true, 380 responsive: [ 381 { 382 breakpoint: 1023, 383 settings: { 384 slidesToShow: 5, 385 slidesToScroll: 1, 386 variableWidth: true 387 } 388 }, 389 { 390 breakpoint: 900, 391 settings: { 392 dots: false, 393 slidesToShow: 3, 394 slidesToScroll: 1 395 } 396 }, 397 { 398 breakpoint: 600, 399 settings: { 400 dots: false, 401 slidesToShow: 3, 402 slidesToScroll: 1 403 } 404 }, 405 { 406 breakpoint: 480, 407 settings: { 408 dots: false, 409 slidesToShow: 1, 410 slidesToScroll: 1 411 } 412 } 413 ] 414 }); 415 416 417 /* Slider - Videos */ 418 $('.slider-responsive-5').slick({ 419 adaptiveHeight: true, 420 dots: false, 421 arrows: true, 422 infinite: false, 423 slidesToShow: 5, 424 slidesToScroll: 1, 425 swipeToSlide: true, 426 responsive: [ 427 { 428 breakpoint: 1023, 429 settings: { 430 slidesToShow: 4, 431 slidesToScroll: 1, 432 variableWidth: true 433 } 434 }, 435 { 436 breakpoint: 900, 437 settings: { 438 dots: false, 439 slidesToShow: 3, 440 slidesToScroll: 1 441 } 442 }, 443 { 444 breakpoint: 600, 445 settings: { 446 dots: false, 447 slidesToShow: 3, 448 slidesToScroll: 1 449 } 450 }, 451 { 452 breakpoint: 480, 453 settings: { 454 dots: false, 455 slidesToShow: 1, 456 slidesToScroll: 1 457 } 458 } 459 ] 460 }); 461 462 463 /* Sllider - GalerÃa */ 464 $('.slider-responsive-6').slick({ 465 adaptiveHeight: true, 466 dots: false, 467 arrows: true, 468 prevArrow:"<span class='btn-arrow prev'></span>", 469 nextArrow:"<span class='btn-arrow next'></span>", 470 infinite: false, 471 slidesToShow: 3, 472 slidesToScroll: 1, 473 responsive: [ 474 { 475 breakpoint: 1024, 476 settings: { 477 slidesToShow: 2, 478 slidesToScroll: 1 479 } 480 }, 481 { 482 breakpoint: 720, 483 settings: { 484 dots: true, 485 slidesToShow: 2, 486 slidesToScroll: 1 487 } 488 }, 489 { 490 breakpoint: 600, 491 settings: { 492 dots: true, 493 slidesToShow: 1, 494 slidesToScroll: 1 495 } 496 }, 497 { 498 breakpoint: 480, 499 settings: { 500 dots: true, 501 slidesToShow: 1, 502 slidesToScroll: 1 503 } 504 } 505 ] 506 }); 507 508 509 /* Slider - Canales */ 510 $('.slider-responsive-9').slick({ 511 adaptiveHeight: true, 512 dots: false, 513 arrows: true, 514 infinite: false, 515 slidesToShow: 9, 516 slidesToScroll: 1, 517 swipeToSlide: true, 518 responsive: [ 519 { 520 breakpoint: 1023, 521 settings: { 522 slidesToShow: 3, 523 slidesToScroll: 1, 524 variableWidth: true 525 } 526 }, 527 { 528 breakpoint: 900, 529 settings: { 530 dots: false, 531 slidesToShow: 3, 532 slidesToScroll: 1 533 } 534 }, 535 { 536 breakpoint: 600, 537 settings: { 538 dots: false, 539 slidesToShow: 2, 540 slidesToScroll: 1 541 } 542 }, 543 { 544 breakpoint: 480, 545 settings: { 546 dots: false, 547 slidesToShow: 2, 548 slidesToScroll: 1 549 } 550 } 551 ] 552 }); 553 554 /* Menú */ 555 $("ul.list-menu-top li ul").each(function(n) { 556 $(this).parent().attr("class", "padre"); 557 }); 558 $("ul.list-menu-top li.active").each(function(n) { 559 $(this).parent().parent().addClass("current"); 560 }); 561 $("ul.list-menu-top li ul li.active").each(function(n) { 562 $(this).parent().parent().parent().parent().addClass("current"); 563 }); 564 $("ul.list-menu-top li.padre > a").each(function(n) { 565 //n.preventDefault(); 566 console.log("-->"+ $(this).attr("href") ); 567 if( $(this).attr("href") == '#' ) 568 { 569 console.log( "++>" ); 570 $(this).removeAttr('href'); 571 } 572 }); 573 574 /* Menú Móvil */ 575 $("ul.list-menu-movil li ul li.active").each(function(n) { 576 $(this).parent().parent().addClass("active"); 577 $(this).parent().addClass("collapse in"); 578 579 }); 580 $("ul.list-menu-movil li.active").each(function(n) { 581 $(this).parent().parent().parent().parent().addClass("active"); 582 $(this).parent().parent().parent().addClass("collapse in"); 583 584 }); 585 $("ul.list-menu-movil li.padre > a").each(function(n) { 586 //n.preventDefault(); 587 console.log("-->"+ $(this).attr("href") ); 588 if( $(this).attr("href") == '#' ) 589 { 590 console.log( "++>" ); 591 $(this).removeAttr('href'); 592 } 593 }); 594 595 596 /* Fancybox - Custom */ 597 $('[data-fancybox]').fancybox({ 598 youtube : { 599 controls : 1, 600 showinfo : 0, 601 autoplay : 1, 602 mute: 1 603 }, 604 vimeo : { 605 color : 'f00' 606 } 607 }); 608 609 /* 610 Paginación (alfabética)
611 https://www.jqueryscript.net/other/jQuery-Plugin-To-Create-An-Alphabetical-Navigation-Filter-listnav.html 612 */ 613 if ( $(".pagAlfa").length > 0 ) { 614 $('.pagAlfa').listnav({ 615 includeAll: false, 616 showCounts: false, 617 noMatchText: '...' 618 }); 619 } 620 $('.list-exhibidores a').click(function(e) { 621 e.preventDefault(); 622 }); 623 624 625 /* 626 Paginación 627 */ 628 if ( $(".list-oportunidades-laborales").length > 0 ) { 629 $('.list-oportunidades-laborales tbody').paginathing({ 630 perPage: 5, 631 insertAfter: '.list-oportunidades-laborales', 632 prevNext: false, 633 firstLast: false, 634 }); 635 } 636 637 /* Acordión */ 638 var elem = document.querySelector('.collapsible.expandable.nivel-1'); 639 var instance = M.Collapsible.init(elem, { 640 accordion: false 641 }); 642 643 document.querySelectorAll('.collapsible.expandable.nivel-2').forEach(function(ele, idx) { 644 var instance = M.Collapsible.init(ele, { 645 accordion: false 646 }); 647 }) 648 649 document.querySelectorAll('.collapsible.expandable.nivel-3').forEach(function(ele, idx) { 650 var instance = M.Collapsible.init(ele, { 651 accordion: false 652 }); 653 }) 654 655}); 656 657 658$( window ).on( "load", function() { 659 console.log( "ventana lista" ); 660 // Ancla en las internas 661 //animar_ancla_interna(); 662}); 663
664/* Menu Landing Fixed */ 665function menu_fixed(div_fixed) 666{ 667 console.log( $(div_fixed).length ); 668 if ( $(div_fixed).length == 0 ) { 669 return false; 670 } 671 672 var menu = $(div_fixed); 673 var menu_original = $('.sec-header'); 674 var menu_offset = menu_original.offset(); 675 676 // Cada vez que se haga scroll en la página 677 // haremos un chequeo del estado del menú 678 // y lo vamos a alternar entre 'fixed' y 'static'. 679 $(window).on('scroll', function() 680 { 681 //console.log($(window).scrollTop()); 682 //console.log(menu_offset.top); 683 // Menu 1 684 if($(window).scrollTop() > menu_offset.top) 685 { 686 menu.addClass('fixed'); 687 $(".sec-header").addClass("hidden"); 688 } 689 else 690 { 691 menu.removeClass('fixed'); 692 $(".sec-header").removeClass("hidden"); 693 } 694 }); 695} 696 697/* Suscripción a Boletines */ 698$('#send').click(function() 699{ 700 validar_boletin(base_url); return false; 701}); 702function validar_boletin(base_url) 703{ 704 //alert( $('input[name=terminos_check]:checked').val() ); 705 //alert( $('input[name=politica_check]:checked').val() ); 706 707 var parametros = 708 { 709 "email" : $('#email').val() 710 }; 711 $.ajax({ 712 data: parametros, 713 url: base_url+'assets/phpmailer/send_registro_boletin.php', 714 type: 'post', 715 beforeSend: function() 716 { 717 $('#respuesta').html("<img src='"+base_url+"public/css/images/loader.gif'/>"); 718 $('#send').css( "display", "none" ); 719 }, 720 success: function (response) 721 { 722 if(response == '1') 723 { 724 // Mensaje de Respuesta 725 $('#respuesta').html('¡Gracias por suscribirte!'); 726 727 // Redireccionar página de gracias 728 //setTimeout ("r()", 1000); 729 } 730 else 731 { 732 $('#respuesta').html(response); 733 $('#send').css( "display", "inline-block" ); 734 } 735 } 736 }); 737} 738 739 740$('#send_contacto').click(function() 741{ 742 validar_contacto(base_url); return false; 743}); 744 745 746function validar_contacto(base_url) 747{ 748 //alert( $('input[name=terminos_check]:checked').val() ); 749 //alert( $('input[name=politica_check]:checked').val() ); 750 751 var parametros = 752 { 753 "nombre" : $('#nombre').val(), 754 "email" : $('#email_contacto').val(), 755 "mensaje" : $('#textarea1').val() 756 }; 757 $.ajax({ 758 data: parametros, 759 url: base_url+'assets/phpmailer/send_contacto.php', 760 type: 'post', 761 beforeSend: function() 762 { 763 $('#respuesta-2').html("<img src='"+base_url+"public/css/images/loading-rocket.gif'/>"); 764 $('#send_contacto').css( "display", "none" ); 765 }, 766 success: function (response) 767 { 768 if(response == '1') 769 { 770 // Mensaje de Respuesta 771 $('#respuesta-2').html('¡Gracias por contactarnos!'); 772 773 // Redireccionar página de gracias 774 //setTimeout ("r()", 1000); 775 } 776 else 777 { 778 $('#respuesta-2').html(response); 779 $('#send_contacto').css( "display", "inline-block" ); 780 } 781 } 782 }); 783} 784 785$('#ir-arriba').click(function() 786{ 787 console.log("ancla"); 788 // si existe, hacer el ancla 789 if ( $(".sec-top").length > 0 ) {
790 $("html, body").animate({ scrollTop: $('.sec-top').offset().top }, 1000); 791 } 792}); 793 794function animar_ancla_form() 795{ 796 console.log("ancla") 797 var etiqueta1 = $('.respuesta-formulario'); 798 var etiqueta2 = $('.formulario-ancla'); 799 if (etiqueta1.length) 800 { 801 if( etiqueta1.html() ) 802 { 803 $("html, body").animate({ scrollTop: etiqueta1.offset().top - 200 }, 1000); 804 } 805 else 806 { 807 $("html, body").animate({ scrollTop: etiqueta2.offset().top - 150 }, 1000); 808 } 809 } 810} 811 812 813function animar_ancla_interna() 814{ 815 console.log("ancla") 816 var etiqueta1 = $('.sec-main'); 817 var etiqueta2 = $('.sec-banner'); 818 var etiqueta3 = $('.sec-top'); 819 820 var etiqueta2_height = $('.sec-banner').height(); 821 var etiqueta3_height = $('.sec-top').height(); 822 823 console.log("main: "+etiqueta1.offset().top); 824 console.log("banner: "+etiqueta2.offset().top); 825 console.log("sec-banner height: "+etiqueta2_height); 826 827 828 if (etiqueta1.length) 829 { 830 if( etiqueta1.html() ) 831 { 832 //$("html, body").animate({ scrollTop: etiqueta1.offset().top - 50 }, 1000); 833 //$("html, body").animate({ scrollTop: etiqueta2_height }, 1000); 834 $("html, body").animate({ scrollTop: etiqueta3_height + 100 }, 1000); 835 } 836 //else 837 //{ 838 // $("html, body").animate({ scrollTop: etiqueta2.offset().top - 150 }, 1000); 839 //} 840 } 841}
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.