简体   繁体   English

图像未加载,IE6至IE9

[英]Images not loading, IE6 to IE9

I'm having two problems: 我有两个问题:

  1. My website is not forwarding from index.html on IE6 - IE9 我的网站未从IE6的index.html转发-IE9
  2. Images are not loading on any page IE6 - IE9 IE6-IE9的任何页面上均未加载图像

For the first problem, if you go to http://www.matthallock.com/ the website cycles endlessly regardless if I link it to a file (eg, /hamlet.html) or directly (eg, http://www.matthallock.com/hamlet.html ) 对于第一个问题,如果您访问http://www.matthallock.com/ ,则该网站会无限循环,无论我将其链接到文件(例如,/ hamlet.html)还是直接链接到(例如, http:// www。)。 matthallock.com/hamlet.html

The second problem, more troublesome, is images appearing blank on Internet Explorer. 第二个问题,更麻烦的是,图像在Internet Explorer上显示为空白。 Further, the problem appears to be with the jQuery, as the fixed sidebar also does not work. 此外,问题似乎出在jQuery上,因为固定的侧边栏也不起作用。

I tried the degrade for the lazy load, but that doesn't solve the problem. 我为延迟负载尝试了降级,但是并不能解决问题。 Curiously, if you go to my blog at blog.matthallock.com, there is no issue and the styling of the sidebar appears correct. 奇怪的是,如果您访问我的博客blog.matthallock.com,就没有问题,并且侧边栏的样式似乎正确。

Appearance and functionality works properly in Chrome, Safari, and Firefox. 外观和功能可在Chrome,Safari和Firefox中正常运行。

Any help is much appreciated. 任何帮助深表感谢。

<META HTTP-EQUIV="refresh" CONTENT="0;http://www.matthallock.com/hamlet.html">

You need to specify url= before actually giving the URL, otherwise it just reloads the current page. 您需要在实际提供URL之前指定url= ,否则它将重新加载当前页面。

$("img").lazyload({
    effect : "fadeIn",
    /*
      appear : function(elements_left, settings) {
        console.log("appear");
        console.log(elements_left);
        //console.log(this, elements_left, settings);
      },
      load : function(elements_left, settings) {
        console.log("load");
        console.log(elements_left);
        //console.log(this, elements_left, settings);
      }
    */
});

Your browser console gives you this one for free: "Expected identifier, string or number" - IE does not like trailing commas in object definitions, and because of your multiline comment your resulting code is: 您的浏览器控制台免费为您提供:“期望的标识符,字符串或数字”-IE不喜欢对象定义中的尾部逗号,由于多行注释,您得到的代码为:

$("img").lazyload({effect:"fadeIn",});

See that extra comma? 看到多余的逗号吗? Remove it, and everything magically works. 删除它,一切都会神奇地起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM