'); $('article.entry-wrapper.item-preview').css('max-height', parseInt($('article.entry-wrapper.item-preview').css('max-height'))+500+'px'); } $('#hubs-container').removeClass('non-blogpost').addClass('blogpost');
for(i = 1; i li[data-collection-id="321558"] a').each(function(){ var text = $(this).text().split(' '); if(text.length '+text[1]+''; $(this).html( text.join(' ') ); }); } $(document).ready(replaceAllText); }
// GDPR stuff function showEUFields(ctaId, selectorType) { let $OSMOptInSpan = $('[data-cta-id=' + ctaId + '][data-mapping="insightTechOptIn"] + span'), $OSMOptIn = $('[data-cta-id=' + ctaId + '][data-mapping="insightTechOptIn"]'), $GDPROptInSpan = $('[data-cta-id=' + ctaId + '][data-mapping="Europe_OptIn__c"] + span'), $GDPROptIn = $('[data-cta-id=' + ctaId + '][data-mapping="Europe_OptIn__c"]'), $countrySelector = $('[data-cta-id=' + ctaId + '][data-mapping="country"]'), $labelOnlyText = $('.label-only-text');
// Only if UL WhitePaper CTA (for now) if(ctaId === 272928) { // console.log('Not in beside CTA');
// First, hide all the EU fields... $OSMOptInSpan.hide(); $OSMOptIn.hide(); // EU Intel opt-in (check)
$GDPROptInSpan.hide(); $GDPROptIn.hide(); // EU partner opt-in (check)
$labelOnlyText.html('By submitting this form, I agree to receive periodic emails from UL LLC (UL) containing best practices, education, industry research, news, updates and promotions related to UL’s products and services. I understand that I can unsubscribe at any time and agree to UL’s Online Policies.');
$countrySelector.addClass('thisone');
$(document).on('change', '.thisone', function() {
var selectedCountry = $(this).val();
if(selectedCountry !== 'United States') { // *** In EU ***
// Change subscribe label to be EU-specific $GDPROptInSpan.html("I agree to receive periodic emails from UL LLC (UL) containing best practices, education, industry research, news, updates and promotions related to UL’s products and services. I understand that I can unsubscribe at any time and agree to UL’s Online Policies."); // EU Subscribe to Partner (check)
// Change general disclaimer to EU version $labelOnlyText.html('');
// Show GDPR-specific fields $OSMOptInSpan.show(); $OSMOptIn.show(); // EU Intel opt-in (check)
$GDPROptInSpan.show(); $GDPROptIn.show(); // EU partner opt-in (check)
// console.log("In EU: " + selectedCountry); } else { // *** Not in EU ***
// Hide GDPR-specific fields $OSMOptInSpan.hide(); $OSMOptIn.hide(); // EU Intel opt-in (check)
$GDPROptInSpan.hide(); $GDPROptIn.hide(); // EU partner opt-in (check)
// Change general disclaimer to non-EU version $labelOnlyText.html('By submitting this form, I agree to receive periodic emails from UL LLC (UL) containing best practices, education, industry research, news, updates and promotions related to UL’s products and services. I understand that I can unsubscribe at any time and agree to UL’s Online Policies.');
// console.log("Not in EU: " + selectedCountry); } }); } }
Hubs.onLoad = function(){ onLoadOrChange(this); $('.nav-toggle').addClass('wide').append('
Sections'); dataLayer.push({'event': 'hubs_loaded'}); }
Hubs.onPageChange = function(){ onLoadOrChange(this); dataLayer.push({'event': 'page_change'}); }
Hubs.onResize = function() { dataLayer.push({'event': 'page_resize'}); }
Hubs.onItemsLoaded = function(){ sponsoredTiles(); bloatedTiles(); dataLayer.push({'event': 'items_loaded'}); console.log('Items loaded, page '+(this.collectionState[Object.keys(this.collectionState)[0]].page+1)); ga('send', 'pageview', window.location.pathname + '#page'+(this.collectionState[Object.keys(this.collectionState)[0]].page+1)); }
Hubs.onCtaActivate = function(ctaId){ var selectorType, hasListingPage = $body.hasClass('listing-page'), hasHubPage = $body.hasClass('hub-page');
if (hasListingPage === true || hasHubPage === true){ selectorType="li" } else if (hasListingPage === true){ selectorType = "div"; }
showEUFields(ctaId, selectorType);
if(ctaId !== 148493 || ctaId !== 272928) { $('[data-cta-id=' + ctaId + '][data-mapping="Europe_OptIn__c"] + span').html("I want to receive emails about webinars, white papers or products and offers from OpenSystems Media & partners."); }
if(ctaId === 213420) { $('[data-cta-id=' + ctaId + '][data-mapping="ibmemployees"]').prop( "checked", true ); $('[data-cta-id=' + ctaId + '][data-mapping="iBMoptinemail"]').prop( "checked", true ); $('[data-cta-id=' + ctaId + '][data-mapping="iBMoptinphone"]').prop( "checked", true ); $('[data-cta-id=' + ctaId + '][data-mapping="iBMoptinpost"]').prop( "checked", true ); } }
$(document).scroll(function() { if($(document).scrollTop() > 320) { $('.left-nav').removeClass('blocked-by-hero'); } else { $('.left-nav').addClass('blocked-by-hero'); } });
const $body = $('body');
const eu_countries = [ "Austria", "Italy", "Belgium", "Latvia", "Bulgaria", "Lithuania", "Croatia", "Luxembourg", "Cyprus", "Malta", "Czech Republic", "Netherlands", "Denmark", "Poland", "Estonia", "Portugal", "Finland", "Romania", "France", "Slovakia", "Germany", "Slovenia", "Greece", "Spain", "Hungary", "Sweden", "Ireland", "United Kingdom" ];