This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head></head> | |
<body> | |
<!-- All your kewl content goes here --> | |
<!-- Append javascript programatically so we don't make needless http requests --> | |
<script> | |
(function(doc){ | |
var appendScripts = function(srcs) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head></head> | |
<body> | |
<!-- All your kewl content goes here --> | |
<!-- Append javascript programatically so we don't make needless http requests --> | |
<script> | |
(function(){ | |
var goodBrowser = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (d, w, activeClass) { | |
if (('ontouchstart' in w) || w.DocumentTouch && d instanceof DocumentTouch) { | |
var activeElement = null, | |
clearActive = function() { | |
if (activeElement) { | |
activeElement.classList.remove(activeClass); | |
activeElement = false; | |
} | |
}, | |
setActive = function(e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('body').on('click', '.speaker-block > a', function(e){ | |
e.preventDefault(); | |
e.stopPropagation(); | |
toggleSpeakerBio($(this).closest('.speaker-block')); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toggleSpeakerBio(target) { | |
closeTransientElementsExcept('speaker'); | |
if (target.hasClass('active')) { | |
target.removeClass('active'); | |
} else { | |
$('.speaker-block').removeClass('active'); | |
target.addClass('active'); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Collapse any sub tab nav down to select menus | |
$('.tab-list, tabs-subnav').collapsify(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initialize any carousels | |
$('.carousel-horizontal').carouselify({ | |
outerWrapperSelector: '.carousel-container', | |
innerWrapperSelector: '.carousel-list', | |
itemSelector: '.carousel-list > li', | |
previousSelector: '.carousel-prev', | |
nextSelector: '.carousel-next' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initialize any "read more" elements | |
$('.press-release').readmorify({ | |
buttons: { | |
more: '<p class="align-center text-btn read-more"><a href="#">Read more</a></p>', | |
less: '<p class="align-center text-btn read-less"><a href="#">Read less</a></p>' | |
}, | |
threshold: 280, | |
duration: 1000 // milliseconds | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initialize any toasters | |
$('.toaster').toasterize({ | |
attractor: $('.article-entry p:last'), | |
minWindowWidth: 960, | |
viewportSpacing: 44 | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Lazy load "below the fold" images | |
$(window).on('load', function(){ | |
$('img').each(function(){ | |
if(this.src.match('1x1.png')) { | |
this.src = $(this).attr('data-src'); | |
} | |
}); | |
}); |
OlderNewer