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 setCSS(prop,value,css){ | |
var ar = ["-webkit-","-o-","-moz-","-ms-","-khtml-",""]; | |
if(css === undefined) | |
{ | |
css = {}; | |
} | |
for(var i = 0, max = ar.length; i<max; i+=1) | |
{ | |
css[ar[i]+prop] = value; | |
} |
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 mousewheelevt=(/Firefox/i.test(navigator.userAgent))? "DOMMouseScroll" : "mousewheel"; | |
if (document.attachEvent) | |
document.attachEvent("on"+mousewheelevt, function(e){scroller(e)}); | |
else if (document.addEventListener) | |
document.addEventListener(mousewheelevt, function(e){scroller(e)},false); | |
function scroller(evt) | |
{ | |
//Guess the 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() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { | |
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; | |
window.cancelAnimationFrame = | |
window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame']; | |
} | |
if (!window.requestAnimationFrame) |
NewerOlder