PageSourceSearch

https://www.pactomundial.org/wp-content/cache/min/1/wp-content/the…/assets/js/programas.js?ver=1790170269

js pactomundial.org collected 2026-10-01 10:15:55 UTC 7,651 bytes, 39 lines download raw bytes

1$(document).ready(function(){var $elementos=$(".content-options-filter .option");if($elementos.length>0){$elementos.eq(0).click()}});$(document).on("click",".content-options-filter .option",function(){if(!$(this).hasClass("active")){var id=$(this).attr('data-id');var dataForm='';var type=$(this).attr('data-type');if($(this).hasClass("active")){$(this).removeClass('active');var select=''}else{var select=$(this).attr('data-select');var encodedDataValue=encodeURIComponent(select);var classOption=".content-options-filter."+type;$(classOption+' .option').each(function(index){$(this).removeClass('active')});$(this).addClass('active')}
2$('.content-options-filter.day .option.active').each(function(index){var typeOthers=$(this).attr('data-type');var selectOthers=$(this).attr('data-select');var encodedDataValueSelect=encodeURIComponent(selectOthers);if(encodedDataValueSelect){dataForm+="&typeday="+typeOthers+"&selectday="+encodedDataValueSelect}});$('.content-options-filter.morning_afternoon .option.active').each(function(index){var typeOthers=$(this).attr('data-type');var selectOthers=$(this).attr('data-select');var encodedDataValueSelect=encodeURIComponent(selectOthers);dataForm+="&typemorning_afternoon="+typeOthers+"&selectmorning_afternoon="+encodedDataValueSelect});$('.content-options-filter.date .option.active').each(function(index){var typeOthers=$(this).attr('data-type');var selectOthers=$(this).attr('data-select');var encodedDataValueSelect=encodeURIComponent(selectOthers);dataForm+="&typedate="+typeOthers+"&selectdate="+encodedDataValueSelect});$('.content-options-filter.description .option.active').each(function(index){var typeOthers=$(this).attr('data-type');var selectOthers=$(this).attr('data-select');var encodedDataValueSelect=encodeURIComponent(selectOthers);dataForm+="&typedescription="+typeOthers+"&selectdescription="+encodedDataValueSelect});dataForm+="&post_id="+id;var data='action=searchPrograma'+dataForm;$.ajax({type:'POST',cache:!1,url:ajaxurl,data:data,dataType:'json',beforeSend:function(){$(".loading").show()},success:function(response){if(response.status=='ok'){$(".loading").hide();$('.content-table').html('');$('.content-table').html(response.html);if(type!=='description'){$('.content-options-filter.description').html(response.filtros)}
3$('#ponentes').load(window.location.href+' #ponentes .container');$(window).on('scroll',function(){var scrollTop=$(this).scrollTop();var windowHeight=$(this).height();var element=$('.container-speakers .content-title');var elementHeight=element.outerHeight();var elementTop=element.offset().top;var distanceFromTop=elementTop-scrollTop;var opacity,scale;if(distanceFromTop<=200){opacity=1;scale=1}else{opacity=Math.max(0,1-(distanceFromTop/windowHeight));scale=Math.max(0,Math.min(1,1-(distanceFromTop/windowHeight)*0.4))}
4element.css({opacity:opacity,transform:'scale3d('+scale+', '+scale+', '+scale+')'})});$(window).on('scroll',function(){var scrollTop=$(this).scrollTop();var windowHeight=$(this).height();var element=$('.container-speakers .content-speakers');var elementHeight=element.outerHeight();var elementTop=element.offset().top;var distanceFromTop=elementTop-scrollTop;var opacity,translateY;if(distanceFromTop<=300){opacity=1;translateY=0}else{opacity=Math.max(0,1-(distanceFromTop/windowHeight));translateY=distanceFromTop/15}
5element.css({opacity:opacity,transform:'translate3d(0px, '+translateY+'px, 0px)'})})}},error:function(){$(".loading").hide()}})}});$(document).on("click",'.load-more-ponentes',function(e){e.preventDefault();var mostrar=$(this).attr('data-mostrar');var exclude=$(this).attr('data-exclude');var id=$(this).attr('data-id');var actual=$(this).attr('data-actual');var total=$(this).attr('data-total');var dataForm='';dataForm+="&exclude="+exclude+"&mostrar="+mostrar+"&actual="+actual+"&id="+id+"&total="+total;var data='action=search_loadMore'+dataForm;var boton=this;$.ajax({type:'POST',cache:!1,url:ajaxurl,data:data,dataType:'json',beforeSend:function(){$(".loading").show()},success:function(response){if(response.status=='ok'){$('.content-speakers').append(response.html);$(boton).attr('data-exclude',response.exclude);$(boton).attr('data-actual',response.actual);if(!response.show){$(boton).remove()}
6$(".loading").hide()}},error:function(){$(".loading").hide()}})});class CountdownGlobalTimer{constructor({selector,targetDate,intervalInSeconds,mobileWidth,completeMessage,complete}){this.selector=selector
7this.targetDate=targetDate
8this.intervalInSeconds=intervalInSeconds
9this.mobileWidth=mobileWidth
10this.completeMessage=completeMessage
11this.complete=complete
12this.flagMobile=!1
13this.showHideRef=null
14this.refs={days:$(`${this.selector} .ogilvy-countdown-days .number`),hours:$(`${this.selector} .ogilvy-countdown-hours .number`),mins:$(`${this.selector} .ogilvy-countdown-minutes .number`),secs:$(`${this.selector} .ogilvy-countdown-seconds .number`),}}
15mobileCountDownCheck(){if(window.innerWidth<=this.mobileWidth){let intervalAlt=()=>{if(this.flagMobile){$(`${this.selector} .ogilvy-countdown-message`).show()
16this.flagMobile=!1}else{$(`${this.selector} .ogilvy-countdown-clock`).show()
17this.flagMobile=!0}
18this.showHideRef=setTimeout(intervalAlt,1000*this.intervalInSeconds)}
19intervalAlt()}else{this.flagMobile=!1
20if(this.showHideRef)clearTimeout(this.showHideRef)
21$(`${this.selector} .ogilvy-countdown-message`).show()
22$(`${this.selector} .ogilvy-countdown-clock`).show()}}
23format(t){if(t<0)return'00';return t<10?'0'+t:t}
24getTimeRemaining(endtime){const total=Date.parse(endtime)-Date.parse(new Date());const days=Math.floor(total/(1000*60*60*24));const hours=Math.floor((total/(1000*60*60))%24);const mins=Math.floor((total/1000/60)%60);const secs=Math.floor((total/1000)%60);return{total,days,hours,mins,secs,}}
25updateTimer({days,hours,mins,secs}){this.refs.days.text(this.format(days));this.refs.hours.text(this.format(hours));this.refs.mins.text(this.format(mins));this.refs.secs.text(this.format(secs))}
26startTimer(){const timer=this.getTimeRemaining(this.targetDate);this.updateTimer(timer);let intervalTimer=setInterval(()=>{const timer=this.getTimeRemaining(this.targetDate);if(timer.total>0){this.updateTimer(timer)}else{$(`${this.selector} .ogilvy-countdown-clock`).addClass("complete")
27$(`${this.selector} .ogilvy-countdown-clock`).hide()
28$(`${this.selector} .ogilvy-countdown-message`).show()
29$(`${this.selector} .ogilvy-countdown-message`).text(this.completeMessage)
30if(this.showHideRef)clearTimeout(this.showHideRef)
31this.mobileCountDownCheck=()=>{}
32clearTimeout(intervalTimer)
33this.complete()}},1000);$(window).resize(()=>{if(this.showHideRef)clearTimeout(this.showHideRef)
34this.mobileCountDownCheck()})
35this.mobileCountDownCheck()}}
36$(document).ready(function(){var date=$('.container-countdown').attr('data-fecha');const timerGlobalBanner=new CountdownGlobalTimer({selector:"#ogilvy-countdown-banner",targetDate:new Date(date),intervalInSeconds:2,mobileWidth:600,completeMessage:"Mensaje al completarse el timer",complete:()=>{}});timerGlobalBanner.startTimer()})
37$(function(){var $win=$(window);var $nav=$('.eventos2024.container-nav');var $stop=$('.aniversario20.container-joinus');if(!$nav.length)return;var originalPosition=$nav.offset().top;function onScroll(){var current=$win.scrollTop();var stopPosition=$stop.length?$stop.offset().top:Number.POSITIVE_INFINITY;if(current>=stopPosition-$nav.outerHeight(!0)){$nav.css({position:'static',top:''});return}
38if(current>=originalPosition){$nav.css({position:'sticky',top:0})}
38else{$nav.css({position:'static',top:''})}}
39$win.on('scroll',onScroll);$win.on('resize',function(){originalPosition=$nav.offset().top;onScroll()});onScroll()})

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.