Sha256: 03da2941cd90d232c46a3c86af401bd3ff8752f56ec07590051ac404a3809be2

Contents?: true

Size: 1.96 KB

Versions: 11

Compression:

Stored size: 1.96 KB

Contents

/**
 * Support Plugin
 *
 * @version 2.3.4
 * @author Vivid Planet Software GmbH
 * @author Artus Kolanowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($, window, document, undefined) {

	var style = $('<support>').get(0).style,
		prefixes = 'Webkit Moz O ms'.split(' '),
		events = {
			transition: {
				end: {
					WebkitTransition: 'webkitTransitionEnd',
					MozTransition: 'transitionend',
					OTransition: 'oTransitionEnd',
					transition: 'transitionend'
				}
			},
			animation: {
				end: {
					WebkitAnimation: 'webkitAnimationEnd',
					MozAnimation: 'animationend',
					OAnimation: 'oAnimationEnd',
					animation: 'animationend'
				}
			}
		},
		tests = {
			csstransforms: function() {
				return !!test('transform');
			},
			csstransforms3d: function() {
				return !!test('perspective');
			},
			csstransitions: function() {
				return !!test('transition');
			},
			cssanimations: function() {
				return !!test('animation');
			}
		};

	function test(property, prefixed) {
		var result = false,
			upper = property.charAt(0).toUpperCase() + property.slice(1);

		$.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property) {
			if (style[property] !== undefined) {
				result = prefixed ? property : true;
				return false;
			}
		});

		return result;
	}

	function prefixed(property) {
		return test(property, true);
	}

	if (tests.csstransitions()) {
		/* jshint -W053 */
		$.support.transition = new String(prefixed('transition'))
		$.support.transition.end = events.transition.end[ $.support.transition ];
	}

	if (tests.cssanimations()) {
		/* jshint -W053 */
		$.support.animation = new String(prefixed('animation'))
		$.support.animation.end = events.animation.end[ $.support.animation ];
	}

	if (tests.csstransforms()) {
		/* jshint -W053 */
		$.support.transform = new String(prefixed('transform'));
		$.support.transform3d = tests.csstransforms3d();
	}

})(window.Zepto || window.jQuery, window, document);

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
jekyll-theme-artsy-0.1.12 assets/js/owlcarousel/src/js/owl.support.js
jekyll-theme-artsy-0.1.11 assets/js/owlcarousel/src/js/owl.support.js
jekyll-theme-artsy-0.1.9 assets/js/owlcarousel/src/js/owl.support.js
jekyll-theme-artsy-0.1.8 assets/js/owlcarousel/src/js/owl.support.js
jekyll-theme-artsy-0.1.7 assets/js/owlcarousel/src/js/owl.support.js
jekyll-theme-artsy-0.1.6 assets/js/owlcarousel/src/js/owl.support.js
jekyll-theme-artsy-0.1.5 assets/js/owlcarousel/src/js/owl.support.js
jekyll-theme-artsy-0.1.4 assets/js/owlcarousel/src/js/owl.support.js
jekyll-theme-artsy-0.1.3 assets/js/owlcarousel/src/js/owl.support.js
jekyll-theme-artsy-0.1.2 js/owlcarousel/src/js/owl.support.js
jekyll-theme-artsy-0.1.1 js/owlcarousel/src/js/owl.support.js