Head.js: weird negative html margin?

Some of you may already have experience using it head.js. I am the first user, and I am having some problems: as soon as I try to load several javascript files, my tag <html>will receive style="margin-left: -32767px;".

<script type="text/javascript">
   var path = "<?php bloginfo('template_directory'); ?>";

   head.js( path + "/js/jquery-1.5.min.js", path + "/js/css3-mediaqueries.js",
         path + "/js/jquery-cookie.js", path + "/js/scripts.js", function() { });
</script>

Any idea why this is happening? When I get rid of this weird style attribute in my html with Firebug, all javascript libraries work fine. However, when the page loads the content, it flickers, and as soon as this negative field is applied, nothing is visible on my page.

+3
source share
1 answer

Negative margin comes from css3-mediaqueries.js

the code:

var _57 = document.documentElement;
_57.style.marginLeft = "-32767px";
setTimeout(function () {
    _57.style.marginTop = "";
}, 20000);

, , , , html

style="margin-left:0 !important;"

JS:

document.getElementsByTagName("HTML")[0].style.margin = "0"
+2

Source: https://habr.com/ru/post/1790791/


All Articles