Skip to content

Instantly share code, notes, and snippets.

View huanglong-zz's full-sized avatar
🎯
Focusing

Scott Dong huanglong-zz

🎯
Focusing
View GitHub Profile
KISSY.add('fixPng', function (S) {
function fixPng(tagCls) {
var arVersion = navigator.appVersion.split('MSIE')
var version = parseFloat(arVersion[1])
if ((version >= 5.5 && version < 7.0) && (document.body.filters)) {
var imgs = KISSY.query(tagCls)
for(var i = 0; i < imgs.length; i++) {
var img = imgs[i]
var _IE = (function(){
var v = 3, div = document.createElement('div'), all = div.getElementsByTagName('i');
while (
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
all[0]
);
return v > 4 ? v : false ;
}());