Last active
December 16, 2015 09:29
-
-
Save ingowennemaring/5413621 to your computer and use it in GitHub Desktop.
Redraw selectivzr.js e.g. after loading content via AJAX
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
<html class="ie8"> | |
<head> | |
<!--[if (gte IE 6)&(lte IE 8)]> | |
<script src="js/libs/selectivizr.min.js" type="text/javascript" id="selectivizr"></script> | |
<![endif]--> | |
</head> | |
<body> | |
</body> | |
</html> |
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
window.selectivzrRedraw = (function(){ | |
var selectivizrCode; | |
function reSelectivizr(){ | |
if( $('html').hasClass('ie8') ) { | |
if(selectivizrCode === undefined) { | |
$.get($('#selectivizr').attr('src'), {}, function(data){ | |
selectivizrCode = data; | |
eval(selectivizrCode); | |
},'text'); | |
} | |
else{ | |
eval(selectivizrCode); | |
} | |
} | |
else { | |
return false; | |
} | |
} | |
return reSelectivizr; | |
}()); | |
window.selectivzrRedraw(); | |
/* | |
var onCompleteLightbox = function() { | |
window.selectivzrRedraw(); | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment