2017.11.28 延迟加载js

(function ($) {
"use strict";
var domstyle = $("header .pcnav").css("display");
if (domstyle != 'none') {
document.write("<script src='http://zen-tokyo.sakura.ne.jp/zen/wp-content/themes/zen/js/index_dommove.js'></script>");
}
})(jQuery);
定义一个dome的css display
判断dome 的 display的值不是none的时候加载js
相关文章