Created
February 4, 2011 03:03
-
-
Save miketaylr/810674 to your computer and use it in GitHub Desktop.
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 ua = navigator.userAgent; | |
var isFF = parseFloat(ua.split('Firefox/')[1]) || undefined; | |
var isWK = parseFloat(ua.split('WebKit/')[1]) || undefined; | |
var isOpera = parseFloat(ua.split('Opera/')[1]) || undefined; | |
var canTransition = (function() { | |
var ver = parseFloat(ua.split('Version/')[1]) || undefined; | |
// test to determine if this browser can handle CSS transitions. | |
var cachedCanTransition = | |
(isWK || (isFF && isFF > 3.6 ) || (isOpera && ver >= 10.5)); | |
return function() { return cachedCanTransition; } | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment