代码拉取完成,页面将自动刷新
;(function(window){
var
// Is Modernizr defined on the global scope
Modernizr = typeof Modernizr !== "undefined" ? Modernizr : false,
// Always expect both kinds of event
buttonPressedEvent = 'touchstart click',
// List of all animation/transition properties
// with its animationEnd/transitionEnd event
animationEndEventNames = {
'WebkitAnimation' : 'webkitAnimationEnd',
'OAnimation' : 'oAnimationEnd',
'msAnimation' : 'MSAnimationEnd',
'animation' : 'animationend'
},
transitionEndEventNames = {
'WebkitTransition' : 'webkitTransitionEnd',
'OTransition' : 'oTransitionEnd',
'msTransition' : 'MSTransitionEnd',
'transition' : 'transitionend'
},
Effeckt = function() {
this.init();
};
// Current version.
Effeckt.version = '0.0.1';
// Initialization method
Effeckt.prototype.init = function() {
this.buttonPressedEvent = buttonPressedEvent;
//event trigger after animation/transition end.
this.transitionEndEventName = Modernizr ? transitionEndEventNames[Modernizr.prefixed('transition')] : getTransitionEndEventNames();
this.animationEndEventName = Modernizr ? animationEndEventNames[Modernizr.prefixed('animation')] : getAnimationEndEventNames();
this.transitionAnimationEndEvent = this.animationEndEventName + ' ' + this.transitionEndEventName;
};
Effeckt.prototype.getViewportHeight = function() {
var docElement = document.documentElement,
client = docElement['clientHeight'],
inner = window['innerHeight'];
if( client < inner )
return inner;
else
return client;
};
// Get all the properties for transition/animation end
function getTransitionEndEventNames() {
return _getEndEventNames( transitionEndEventNames );
}
function getAnimationEndEventNames() {
return _getEndEventNames( animationEndEventNames );
}
function _getEndEventNames(obj) {
var events = [];
for ( var eventName in obj ) {
events.push( obj[ eventName ] );
}
return events.join(' ');
}
// Creates a Effeckt object.
window.Effeckt = new Effeckt();
})(this);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。