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
Modernizr.addTest('backgroundcliptext',function(){ | |
var div = document.createElement('div'); | |
var bgClip = false; | |
if ('backgroundClip' in div.style) bgClip = true; | |
'Webkit Moz O ms Khtml'.replace(/([A-Za-z]*)/g, function(val) { | |
if (val+'BackgroundClip' in div.style) bgClip = true; | |
}); | |
if (bgClip) { | |
div.style.backgroundClip = 'text'; | |
if (div.style.backgroundClip === 'text') return true; |
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
REMOVED /account/btnCheckOrderStatus.png | |
REMOVED /account/btnCreateAccount.png | |
REMOVED /account/btnCreateAccountR.png | |
REMOVED /account/btnEditPrefs.png | |
REMOVED /account/btnSavePrefs.png | |
REMOVED /account/btnSignInR.png | |
REMOVED /account/btnUnsubscribe.png | |
REMOVED /checkout/btnApply.png | |
REMOVED /checkout/btnApplyBalance.png | |
REMOVED /checkout/btnBackToOffer.png |
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($, deck, undefined) { | |
$(document).bind('deck.change', function(e, from, to) { | |
var $prev = $[deck]('getSlide', to-1), | |
$next = $[deck]('getSlide', to+1); | |
$[deck]('getSlide', to).trigger('deck.becameCurrent'); | |
$prev && $prev.trigger('deck.becamePrevious'); | |
$next && $next.trigger('deck.becameNext'); | |
}); | |
})(jQuery, 'deck'); |
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
$(document).bind('deck.change', function(e, from, to) { | |
var osp = $.deck('getOptions').classes.onPrefix; | |
$.deck('getContainer') | |
.removeClass(osp + $.deck('getSlide', from).attr('id')) | |
.addClass(osp + $.deck('getSlide', to).attr('id')); | |
}); |
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
$(document).ready(function() { | |
$.waypoints.settings.scrollThrottle = 30; | |
$('#main').waypoint(function(event, direction){ | |
/* Just as we have a sticky class applied when we hit the top waypoint, | |
we'll have a different class applied when we bottom out */ | |
if (direction === 'down') { | |
$(this).removeClass('sticky').addClass('bottomed'); | |
} | |
else { | |
$(this).removeClass('bottomed').addClass('sticky'); |
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
<script> | |
(function($, deck, undefined) { | |
var $d = $(document), | |
toggleHorizon = function(base, fn) { | |
var slides = $[deck]('getSlides'), | |
opts = $[deck]('getOptions'), | |
min = base - opts.horizon, | |
max = base + opts.horizon, | |
i; |
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
/* How one might go about removing (and restoring) deck.js from a page */ | |
$(function() { | |
/* Give all the link tags pointing to deck related CSS files a class (.deck-css here) */ | |
var $deckStyles = $('.deck-css'); | |
/* Store their hrefs for later */ | |
$deckStyles.each(function() { | |
$(this).data('href', this.href); | |
}); |
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
/* Plays all audio elements inside a slide when the slide becomes active | |
and pauses them when the user navigates away. Replace pause with | |
whatever functionality desired (maybe pause and set currentTime to 0?) */ | |
$(document).bind('deck.change', function(e, from, to) { | |
$.deck('getSlide', from).find('audio').each(function() { | |
this.pause && this.pause(); | |
}); | |
$.deck('getSlide', to).find('audio').each(function() { | |
this.play && this.play(); | |
}); |
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
<div class="slide"> | |
<pre><code>var x = 5; | |
x * x; => <span class="reveal"><span class="first">???...</span><span class="second">25</span></span></code></pre> | |
</div> | |
<style> | |
.reveal { | |
-webkit-transform:none !important; | |
-moz-transform:none !important; | |
-o-transform:none !important; |
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
$(document).bind('deck.change', function(event, from, to) { | |
var $entering = $.deck('getSlide', to); | |
$leaving = $.deck('getSlide', from); | |
if ($entering.hasClass('animation')) { | |
// Do what you need to do to start animation inside currentSlide | |
} | |
if ($leaving.hasClass('animation')) { | |
// Do what you need to do to stop animation, if anything |
OlderNewer