1var didScroll; 2var lastScrollTop = 30; 3var delta = 5; 4var navbarHeight = jQuery(".mysticky-welcomebar-fixed").outerHeight(); 5 6jQuery(window).scroll(function (event) { 7 didScroll = true; 8}); 9 10setInterval(function () { 11 if (didScroll) { 12 hasScrolled(); 13 didScroll = false; 14 } 15}, 150); 16 17function hasScrolled() { 18 var st = jQuery(this).scrollTop(); 19 20 // Make sure they scroll more than delta 21 if (Math.abs(lastScrollTop - st) <= delta) return; 22 23 // If they scrolled down and are past the navbar, add class .nav-up. 24 // This is necessary so you never see what is "behind" the navbar. 25 if (st > lastScrollTop && st > navbarHeight) { 26 // Scroll Down 27 jQuery(".mysticky-welcomebar-fixed") 28 .removeClass("nav-down") 29 .addClass("nav-up"); 30 jQuery("body") 31 .removeClass("welcome-visible") 32 } else { 33 // Scroll Up 34 if (st + jQuery(window).height() < jQuery(document).height()) { 35 jQuery(".mysticky-welcomebar-fixed") 36 .removeClass("nav-up") 37 .addClass("nav-down"); 38 jQuery("body") 39 .addClass("welcome-visible"); 40 } 41 42 } 43 if (jQuery(".mysticky-welcomebar-fixed").hasClass("mysticky-welcomebar-notapper")) { 44 jQuery("body") 45 .removeClass("welcome-visible"); 46 } 47 48 lastScrollTop = st; 49} 50 51// secondary-menu-add-or-remove-class 52jQuery(document).ready(function ($) { 53 54 var scrollLink = jQuery('#ipn li a'); 55 56 jQuery(window).scroll(function () { 57 // Active link switching 58 var scrollbarLocation = jQuery(this).scrollTop(); 59 60 scrollLink.each(function () { 61 62 var sectionOffset = jQuery(this.hash).offset().top - 200; 63 64 if (sectionOffset <= scrollbarLocation) { 65 jQuery(this).parent().addClass('nav-selected'); 66 jQuery(this).parent().siblings().removeClass('nav-selected'); 67 } 68 }) 69 70 }) 71 72 $('.mob_popuplogo').detach().insertBefore($('#mobile-drawer').find('.drawer-header button')); 73 74 $('.inpageNav_mobile-toggle').click(function () { 75 $('.inpageNav_mobile-toggle').toggleClass('toggle-active'); 76 $('#ipn').toggleClass('secondary-open'); 77 }); 78 79 $('.inpageNav-links').click(function () { 80 $('.inpageNav_mobile-toggle').removeClass('toggle-active'); 81 $('#ipn').removeClass('secondary-open'); 82 }); 83 84 if($('#partner-thumb').length > 0){ 85 var imgArray = [], i = 0; 86 //console.log($('#partner-thumb').find('.gallery-item').length); 87 $('#partner-thumb').find('.gallery-item').each(function(){ 88 var img = $(this).find('a').attr('href'); 89 if(typeof img !== undefined){ 90 imgArray[i] = img; 91 } 92 i++; 93 }); 94 //console.log(imgArray.length); 95 if(imgArray.length > 0){ 96 setTimeout(function(){ 97 $('#case-study').find('.elementor-element').children('.elementor-element').each(function(){ 98 var j=0; 99 if($(this).children('.elementor-element').hasClass('slidercustom')){ 100 //console.log("in - "+$(this).children('.slidercustom').find('.elementor-swiper').find('.swiper-pagination-bullets').length); 101 $(this).children('.slidercustom').find('.elementor-swiper').children('.elementor-slides-wrapper').children('.swiper-pagination-bullets').children('span').each(function(){ 102 //console.log($(this).attr('aria-label')); 103 $(this).css({"background-image": "url("+imgArray[j]+")"}); 104 j++; 105 }); 106 } 107 }); 108 var k=0; 109 $('#case-study').find('.mobile-case-study').find('.elementor-swiper').children('.elementor-slides-wrapper').children('.swiper-pagination-bullets').children('span').each(function(){ 110 //console.log($(this).attr('aria-label')); 111 $(this).css({"background-image": "url("+imgArray[k]+")"}); 112 k++; 113 }); 114 }, 1500); 115 } 116 } 117}); 118// back-to-top 119var back_btn = jQuery("#back-to-top"); 120 121jQuery(window).scroll(function () { 122 if (jQuery(window).scrollTop() > 300) { 123 back_btn.addClass("show"); 124 } else { 125 back_btn.removeClass("show"); 126 } 127}); 128 129back_btn.on("click", function (e) { 130 e.preventDefault(); 131 jQuery("html, body").animate({ scrollTop: 0 }
131, "300"); 132}); 133 134 135jQuery(window).scroll(function () { 136 if (jQuery(window).scrollTop() >= 50) { 137 jQuery("header").addClass("fixed-header"); 138 } else { 139 jQuery("header").removeClass("fixed-header"); 140 } 141}); 142 143jQuery("document").ready(function ($) { 144 $("#mega-menu-mobile") 145 .find("li.menu_mega_right") 146 .each(function () { 147 var textWidget = $(this) 148 .find(".mega-sub-menu") 149 .children("li.widget_text"); 150 $(this).find(".mega-sub-menu").children("li.widget_text").remove(); 151 $(this) 152 .find(".mega-sub-menu") 153 .children("li:first-child") 154 .after(textWidget); 155 }); 156 157 158 $(window).scroll(function () { 159 $('#ipn').children('li').each(function () { 160 if ($(this).hasClass('nav-selected')) { 161 var cmenu = $(this).children('a').html(); 162 $('.inpageNav_mobile-toggle--current-section').html(cmenu); 163 } 164 }); 165 }); 166}); 167 168 169(function ($) { 170 171 $('#Top_Nav-').hover(function(){ 172 $(this).toggleClass('active'); 173 $(this).siblings('#account').toggleClass('open'); 174 }); 175 176 function load_posts(pageNumber, ppp, maxpage, postType, listType) { 177 pageNumber++; 178 var str = '&post_type=' + postType + '&list_type=' + listType + '&pageNumber=' + pageNumber + '&ppp=' + ppp + '&action=load_more_ajax'; 179 $.ajax({
180 type: "POST", 181 dataType: "html", 182 url: ajax_posts.ajaxurl, 183 data: str, 184 success: function (data) { 185 var $data = $(data); 186 if ($data.length) { 187 $(".load_more_posts").attr('data-pagenumber', pageNumber); 188 $("#news-award-section").find('.row').append($data); 189 if (pageNumber < maxpage) { 190 $(".load_more_posts").attr("disabled", false); 191 } else { 192 $(".load_more_posts").hide(); 193 } 194 } 195 }, 196 error: function (jqXHR, textStatus, errorThrown) { 197 $loader.html(jqXHR + " :: " + textStatus + " :: " + errorThrown); 198 } 199 200 }); 201 return false; 202 } 203 204 $(".load_more_posts").delegate('a', "click", function () { // When btn is pressed. 205 $(this).parent(".load_more_posts").attr("disabled", true); // Disable the button, temp. 206 var pageNumber = $(this).parent(".load_more_posts").attr('data-pagenumber'); 207 var ppp = $(this).parent(".load_more_posts").attr('data-ppp'); 208 var maxpage = $(this).parent(".load_more_posts").attr('data-maxpage'); 209 var postType = $(this).parent(".load_more_posts").attr('data-postType'); 210 var listType = $(this).parent(".load_more_posts").attr('data-listType'); 211 load_posts(pageNumber, ppp, maxpage, postType, listType); 212 }); 213 214 215 function load_episodes(pageNumber, ppp, maxpage) { 216 pageNumber++; 217 var str = '&pageNumber=' + pageNumber + '&ppp=' + ppp + '&action=load_more_episodes'; 218 $.ajax({
219 type: "POST", 220 dataType: "html", 221 url: ajax_posts.ajaxurl, 222 data: str, 223 success: function (data) { 224 var $data = $(data); 225 if ($data.length) { 226 $(".load_more_episodes").attr('data-pagenumber', pageNumber); 227 $("#featured-section").find('.row').append($data); 228 console.log(pageNumber); 229 console.log(maxpage); 230 if (pageNumber < maxpage) { 231 $(".load_more_episodes").attr("disabled", false); 232 } else { 233 $(".load_more_episodes").hide(); 234 } 235 } 236 }, 237 error: function (jqXHR, textStatus, errorThrown) { 238 $loader.html(jqXHR + " :: " + textStatus + " :: " + errorThrown); 239 } 240 241 }); 242 return false; 243 } 244 245 $(".load_more_episodes").delegate('a', "click", function () { // When btn is pressed. 246 $(this).parent(".load_more_episodes").attr("disabled", true); // Disable the button, temp. 247 var pageNumber = $(this).parent(".load_more_episodes").attr('data-pagenumber'); 248 var ppp = $(this).parent(".load_more_episodes").attr('data-ppp'); 249 var maxpage = $(this).parent(".load_more_episodes").attr('data-maxpage'); 250 load_episodes(pageNumber, ppp, maxpage); 251 }); 252 253 254 setTimeout(function () { 255 if ($('.job-role-list').length > 0) { 256 $('.job-role-list ul li').each(function () { 257 $(this).find('.job-list li').each(function () { 258 var jobId = $(this).attr('data-jobid'); 259 console.log(jobId); 260 $(this).on('click', function (e) { 261 console.log(jobId); 262 e.preventDefault(); 263 e.stopPropagation(); 264 e.stopImmediatePropagation(); 265 window.open('https://corestack.freshteam.com/jobs/' + jobId, '_blank'); 266 }); 267 }); 268 }); 269 } 270 }, 4000); 271 272 setTimeout(function () { 273 $('.select2-container').each(function () { 274 $(this).find('.select2-search__field').on('click', function () { 275 $('.job-role-list ul li').each(function () { 276 $(this).find('.job-list li').each(function () { 277 var jobId = $(this).attr('data-jobid'); 278 console.log(jobId); 279 $(this).on('click', function (e) { 280 console.log(jobId); 281 e.preventDefault(); 282 e.stopPropagation(); 283 e.stopImmediatePropagation(); 284 window.open('https://corestack.freshteam.com/jobs/' + jobId, '_blank'); 285 }); 286 }); 287 }); 288 }); 289 }); 290 }, 4000); 291})(jQuery); 292 293/**Diwakar's Custom JS Code Begins - As on Oct 01 2024**/ 294 295/**script to fix anchor scroll to section ids**/ 296jQuery(document).ready(function() { 297jQuery('a[href*="#"]:not([href="#"])').click(function() { 298 var offset = -120; // <-- change the value here 299 if (location.pathname.replace(/^\//,'') === this.pathname.replace(/^\//,'') && location.hostname === this.hostname) { 300 var target = jQuery(this.hash); 301 target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']'); 302 if (target.length) { 303 jQuery('html, body').animate({ 304 scrollTop: target.offset().top + offset 305 }, 1000); 306 return false; 307 } 308 } 309}); 310}); 311 312 313 314/**script to add on hover effect to badges imgs on home page**/ 315jQuery(document).ready(function () { 316 jQuery('div.partnership-badges > div.partnership-badges-img-outer > div.partnership-badges-bottom-img > div.elementor-widget-container').addClass('gridview'); 317 jQuery('div.partnership-badges > div.partnership-badges-img-outer > div.partnership-badges-bottom-img > div.elementor-widget-container > a').addClass('contentarea'); 318}); 319 320 321 322/**Fix to navigating thru past events on events listing page**/ 323jQuery(window).load(function () { 324 jQuery('a.tribe-events-c-nav__prev, a.tribe-events-c-nav__next, a.tribe-events-c-top-bar__nav-link--prev, a.tribe-events-c-top-bar__nav-link--next').click(function (e) { 325 console.log('clicked1'); 326 e.preventDefault(); 327 var urlToOpen = jQuery(this).attr('href'); 328 window.location.href=urlToOpen; 329 /*window.open(urlToOpen);*/ 330 }); 331}); 332/**Fix to navigating thru past events on events listing page**/ 333 334/** Changing EDT, EST to ET, PDT, PST to PT and so on for events pages**/ 335jQuery(document).ready(function () { 336 if(jQuery.trim(jQuery('time.tribe-events-calendar-list__event-datetime span.timezone').text()) == 'EDT' || jQuery.trim(jQuery('time.tribe-events-calendar-list__event-datetime span.timezone').text()) == 'EST') { 337 jQuery('time.tribe-events-calendar-list__event-datetime span.timezone').text(' ET '); 338} 339if(jQuery.trim(jQuery('time.tribe-events-calendar-list__event-datetime span.timezone').text()) == 'PDT' || jQuery.trim(jQuery('time.tribe-events-calendar-list__event-datetime span.timezone').text()) == 'PST') { 340 jQuery('time.tribe-events-calendar-list__event-datetime span.timezone').text(' PT '); 341} 342if(jQuery.trim(jQuery('time.tribe-events-calendar-list__event-datetime span.timezone').text()) == 'CDT' || jQuery.trim(jQuery('time.tribe-events-calendar-list__event-datetime span.timezone').text()) == 'CST') { 343 jQuery('time.tribe-events-calendar-list__event-datetime span.timezone').text(' CT '); 344} 345 346 if(jQuery.trim(jQuery('div.tribe-events-schedule h2 span.timezone').text()) == 'EDT' || jQuery.trim(jQuery('time.tribe-events-calendar-list__event-datetime span.timezone').text()) == 'EST') { 347 jQuery('div.tribe-events-schedule h2 span.timezone').text(' ET '); 348} 349if(jQuery.trim(jQuery('div.tribe-events-schedule h2 span.timezone').text()) == 'PDT' || jQuery.trim(jQuery('time.tribe-events-calendar-list__event-datetime span.timezone').text()) == 'PST') { 350 jQuery('div.tribe-events-schedule h2 span.timezone').text(' PT '); 351} 352if(jQuery.trim(jQuery('div.tribe-events-schedule h2 span.timezone').text()) == 'CDT' || jQuery.trim(jQuery('time.tribe-events-calendar-list__event-datetime span.timezone').text()) == 'CST') { 353 jQuery('div.tribe-events-schedule h2 span.timezone').text(' CT '); 354} 355 356}); 357/** Changing EDT, EST to ET, PDT, PST to PT and so on for events pages**/ 358
359/**On blog listing page to have title attr to the anchored heading and thumb of the card**/ 360jQuery(document).ready(function() { 361 var anchorTitle = []; 362 jQuery('body.blog div.entry-content-wrap header.entry-header h2.entry-title').each(function(i) { 363 anchorTitle[i] = jQuery(this).text(); 364 }); 365 jQuery('body.blog div.entry-content-wrap header.entry-header h2.entry-title > a').each(function(j) { 366 jQuery(this).attr('title',anchorTitle[j]); 367 }); 368 jQuery('body.blog article.content-bg > a.post-thumbnail').each(function(k) { 369 jQuery(this).attr('title',anchorTitle[k]); 370 }); 371}); 372/**On blog listing page to have title attr to the anchored heading and thumb of the card**/ 373 374/**On News listing page to have title attr to the anchored heading and thumb of the card**/ 375jQuery(document).ready(function() { 376 var anchorTitleNews = []; 377 jQuery('article.post-17934 div.list-col > div.contentarea > div.content-sec > a > h5').each(function(i) { 378 anchorTitleNews[i] = jQuery(this).text(); 379 }); 380 jQuery('article.post-17934 div.list-col > div.contentarea > div.content-sec > a:nth-of-type(1)').each(function(j) { 381 jQuery(this).attr('title',anchorTitleNews[j]); 382 console.log(anchorTitleNews[1]); 383 }); 384 jQuery('article.post-17934 div.list-col > div.contentarea > img').each(function(k) { 385 jQuery(this).attr('title',anchorTitleNews[k]); 386 }); 387}); 388/**On News listing page to have title attr to the anchored heading and thumb of the card**/ 389 390/**On Awards listing page to have title attr to the anchored heading and thumb of the card**/ 391jQuery(document).ready(function() { 392 var anchorTitleAwards = []; 393 jQuery('article.post-2024 div.list-col > div.contentarea > div.content-sec > a > h5').each(function(i) { 394 anchorTitleAwards[i] = jQuery(this).text(); 395 }); 396 jQuery('article.post-2024 div.list-col > div.contentarea > div.content-sec > a:nth-of-type(1)').each(function(j) { 397 jQuery(this).attr('title',anchorTitleAwards[j]); 398 console.log(anchorTitleAwards[1]); 399 }); 400 jQuery('article.post-2024 div.list-col > div.contentarea > img').each(function(k) { 401 jQuery(this).attr('title',anchorTitleAwards[k]); 402 }); 403}); 404/**On Awards listing page to have title attr to the anchored heading and thumb of the card**/ 405 406/**On CB listing page to have title attr to the anchored heading and thumb of the card**/ 407jQuery(document).ready(function() { 408 var anchorTitleCB = []; 409 jQuery('article.post-16960 div.list-col > div.contentarea > div.content-sec > h5').each(function(i) { 410 anchorTitleCB[i] = jQuery(this).text(); 411 jQuery(this).attr('title',anchorTitleCB[i]); 412 }); 413 jQuery('article.post-16960 div.list-col > div.contentarea > img:nth-of-type(1)').each(function(j) { 414 jQuery(this).attr('title',anchorTitleCB[j]); 415 }); 416}); 417/**On CB listing page to have title attr to the anchored heading and thumb of the card**/ 418 419/**Trimming off unwanted text within card summary of CloudBrew cards in search results**/ 420jQuery(document).ready(function() { 421 var titleText = []; 422 jQuery('body.search.search-results article.type-cloudbrew_episodes header.entry-header h2.entry-title > a').each(function(i) { 423 titleText[i] = jQuery(this).text(); 424 }); 425 jQuery('body.search.search-results article.type-cloudbrew_episodes div.entry-summary > p').each(function(j) { 426 let searchedSummary = jQuery(this).text(); 427 //let substringedSummary = searchedSummary.substring(33,92); 428 let toSubstringFromIndex = 33; 429 let substringedSummary = searchedSummary.substring(toSubstringFromIndex); 430 let substringedSummaryReplaced1 = substringedSummary.replace(titleText[j],''); 431 let substringedSummaryReplaced2 = substringedSummaryReplaced1.replace('Apple PodcastsGoogle PodcastsPlayer EmbedShare Leave a ReviewListen in a New WindowDownloadSoundCloudStitcherSubscribe on AndroidSubscribe via RSSSpotifyAmazon Music / AudibleSubscribe to CloudBrew ',''); 432 console.log(substringedSummaryReplaced2); 433 jQuery(this).text(substringedSummaryReplaced2); 434 }); 435}); 436/**Trimming off unwanted text within card summary of CloudBrew cards in search results**/ 437 438/**For adding cross btn functionality to Cookie Consent Banner **/ 439window.addEventListener("load", function(){ 440 // Wait until the document is fully loaded 441 442 // Check if the Cloudflare consent modal exists 443 var consentBanner = document.querySelector('.cc-window'); 444 445 // If the consent banner exists, add your custom functionality 446 if (consentBanner) { 447 // Add the 'x' (close) button to the top right corner of the existing cookie consent box 448 jQuery('div.cc-window').prepend('<button id="closeBtn" aria-label="Minimize cookie message" class="cc-close" style="position: absolute; top: 10px;right: 10px; background: transparent; border: none; cursor: pointer; font-size: 0.8em; color: #0076e1 !important; font-weight: 600 !important;">✕</button>'); 449 450 // Add the floating button to the bottom right corner of the screen 451 jQuery('div.cc-window').after('<div id="floatingButton" aria-label="Show cookie consent" class="cc-floating" style="display: none; position: fixed; bottom: 10px; left: 20px; width: 50px; height: 50px; background-color: #fff;color: #fff; border-radius: 50%; text-align: center; line-height: 50px; cursor: pointer; z-index: 9999; box-shadow: 0px 2px 7px 0px rgba(0, 0, 0, 0.5); border: 1.5px solid #0076e1;"><img draggable="false" role="img" class="emoji" alt="ðª" src="/wp-content/uploads/cookie-icon-branded.svg"></div>'); 452 453 var cookieConsentBox = jQuery('div.cc-window'); 454 var floatingButton = jQuery('#floatingButton'); 455 var closeBtn = jQuery('#closeBtn'); 456 457 // Close button event listener 458 closeBtn.on('click', function () { 459 cookieConsentBox.hide(); 460 floatingButton.show(); 461 //deleteCookie('cookieconsent_status'); 462 //document.removeCookie('cookieconsent_status', { path: '/' });
463 // Remove 'cookieconsent_status' cookie 464 if (jQuery.removeCookie) { 465 // Use jQuery.removeCookie if the plugin is available 466 jQuery.removeCookie('cookieconsent_status', { path: '/' }); 467 } else { 468 // Native JavaScript method to delete the cookie if plugin not available 469 document.cookie = 'cookieconsent_status=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'; 470 } 471 }); 472 473 // Floating button event listener 474 floatingButton.on('click', function () { 475 cookieConsentBox.show(); 476 floatingButton.hide(); 477 }); 478 479 // Optional: Add listener to "Got it!" button to hide both the banner and floating icon 480 jQuery('.cc-btn.cc-dismiss').on('click', function () { 481 cookieConsentBox.hide(); 482 floatingButton.hide(); 483 }); 484 } else { console.log("Cloudflare Cookie Consent banner not found!"); } 485}); 486/**For adding cross btn functionality to Cookie Consent Banner **/ 487 488/**Diwakar's Custom JS Code Begins - As on Oct 01 2024**/ 489
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.