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
var rtime = new Date(1, 1, 2000, 12,00,00); | |
var timeout = false; | |
var delta = 200; | |
$(window).resize(function() { | |
rtime = new Date(); | |
if (timeout === false) { | |
timeout = true; | |
setTimeout(resizeend, delta); | |
} | |
}); |
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(window) { | |
'use strict'; | |
var lastTime = 0, | |
vendors = ['moz', 'webkit', 'o', 'ms'], | |
x; | |
// Remove vendor prefixing if prefixed and break early if not | |
for (x = 0; x < vendors.length && !window.requestAnimationFrame; x += 1) { | |
window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']; |
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
var prefix = (function () { | |
var styles = window.getComputedStyle(document.documentElement, ''), | |
pre = (Array.prototype.slice | |
.call(styles) | |
.join('') | |
.match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o']) | |
)[1], | |
dom = ('WebKit|Moz|MS|O').match(new RegExp('(' + pre + ')', 'i'))[1]; | |
return { | |
dom: dom, |
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
/** | |
* Adds DoubleClick or SiteCatalyst to any element using supplied | |
* selectors. If no selectors are given, function defaults to | |
* data-dctracking and data-tracking. | |
* | |
* @param {string or array} selectors elements to set tracking | |
*/ | |
function setupTracking(selectors) { | |
//Can pass in selectors as string or array |
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
/** | |
* Throttled Resize event | |
* Updated to use requestAnimationFrame instead of setTimeout | |
* Original: https://github.com/louisremi/jquery-smartresize | |
*/ | |
var $specialThrottle, | |
dummy = {_:0}, | |
frame = 0, | |
wasResized, |
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($) { | |
$(document).ready(function() { | |
$('body').on('mousedown', '#wp_delimgbtn', function(e) { | |
var editor = tinyMCE.activeEditor, | |
element = editor.selection.getNode(); | |
if(element.tagName !== 'FIGURE') { | |
$(element).parents('figure').remove(); | |
} | |
}); |
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
// Updated: 01/28/2014 | |
// Changes: | |
// Removed all non animation specific code | |
// Updated to allow passing in of positioning | |
var cssAnimation = (function($) { | |
var speed = 250, | |
easing = 'linear', | |
cssTransition = 'cubic-bezier(0.39, 0.575, 0.565, 1)', | |
done = false, |
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($, window) { | |
var self = $('html'), | |
dragDelta = 500; | |
friction = 0.35; | |
mouseDown = false, | |
touchDelta = 0; | |
startSwipe = 0, | |
isDragging = false; | |
//Assume no touch on load |
OlderNewer