Last active
May 14, 2019 08:41
-
-
Save Ser-Gen/f50a6768f2435bd3d68b 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
// Иногда ИЕ8 не хочет перерисовывать страницу при изменениях. | |
// Этот скрипт заставляет его это делать | |
function rePaintIE() { | |
if (navigator.appName == 'Microsoft Internet Explorer') { | |
if (/MSIE\s8/.test(navigator.userAgent)) { | |
$('body').append( | |
'<style id="rePaintIE">' | |
+ 'html{position:relative;top:1px;}body{position:relative;top:-1px;}' | |
+ '</style>' | |
); | |
setTimeout(function () {$('#rePaintIE').remove()}, 0 ); | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment