Created
November 19, 2012 15:25
-
-
Save dave1010/4111250 to your computer and use it in GitHub Desktop.
Blink tag support for WebKit
This file contains hidden or 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
// webkit doesn't support the <blink> tag :-( | |
// now it does :-) | |
// usage: jQuery.fixBlink(); | |
// TODO: use CSS animations | |
(function($){ | |
if (!navigator.userAgent.match(/webkit/i)) { | |
return; | |
} | |
jQuery.fixBlink = function(speed) { | |
var visible = 'visible'; | |
setInterval(function() { | |
// search the DOM each time in case new elements are added | |
$('blink').css('visibility', visible); | |
visible = (visible === 'visible' ? 'hidden' : 'visible'); | |
}, speed || 500); | |
}; | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment