Skip to content

Instantly share code, notes, and snippets.

@ingowennemaring
Last active December 16, 2015 09:29
Show Gist options
  • Save ingowennemaring/5413621 to your computer and use it in GitHub Desktop.
Save ingowennemaring/5413621 to your computer and use it in GitHub Desktop.
Redraw selectivzr.js e.g. after loading content via AJAX
<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>
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