Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

Commit

Permalink
Fixed step delay in IE9.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Fernandes Martins committed Feb 4, 2013
1 parent 4458fe6 commit 7782d51
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/jquery.destaque.queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,15 @@
});
},

_hasPerformanceAPISupport: function() {
return window['performance'] && !!performance.now;
},

_queue: function(method) {
var self = this;
var args = arguments[1];
var index = 0;
var start = window['performance'] && !!performance.now ? performance.now() : new Date().getTime();
var start = this._hasPerformanceAPISupport() ? performance.now() : new Date().getTime();
window.requestAnimFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
Expand All @@ -139,7 +143,7 @@

// http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision
if (timestamp >= 1e12) {
progress -= window['performance'] ? performance.timing.navigationStart : 0;
progress -= self._hasPerformanceAPISupport() ? performance.timing.navigationStart : 0;
}

if (progress < self.options.delay*index) {
Expand Down

0 comments on commit 7782d51

Please sign in to comment.