问题描述
我有很重的内容图片。这就是为什么我决定使用延迟加载:
我遵循了所有必需的说明,但不明白为什么第一张图像是我想测试懒加载函数不显示
在我的头部分是这样的:
< script src =jquery.jstype =text / javascript>< / script>
< script src =lazyload.jstype =text / javascript>< / script>
图片:
< img class =lazysrc =grey.gifdata-original =osterman / ost21.jpgwidth =900height =602>
和JS代码
< script type =text / javascript>
$(img.lazy)。lazyload();
< / script>
为什么只显示grey.gif而不显示实际图像?有任何想法吗?我有错误的jquery文件吗?在此先感谢
chrome调试器中的错误:
Uncaught SyntaxError :意外标识符jquery.js:9598
未捕获SyntaxError:意外标识符lazyload.js:228
未捕获ReferenceError :$未定义osterman.html:205
I have heavy content images. Thats why I decided to use lazy load: http://www.appelsiini.net/projects/lazyload
My page is this one: http://www.mysecretathens.gr/kulte_test/osterman.html
I followed all the instructions that are required but dont understand why the first images that I wanted to test the lazy load function dont display
In my head section is this:
<script src="jquery.js" type="text/javascript"></script>
<script src="lazyload.js" type="text/javascript"></script>
the images:
<img class="lazy" src="grey.gif" data-original="osterman/ost21.jpg" width="900" height="602" >
and JS code
<script type="text/javascript">
$("img.lazy").lazyload();
</script>
Why is only the grey.gif showing up and not the actual image? Any ideas? Do I have the wrong jquery files? Thanks in advance
Errors in chrome debugger:
Uncaught SyntaxError: Unexpected identifier jquery.js:9598
Uncaught SyntaxError: Unexpected identifier lazyload.js:228
Uncaught ReferenceError: $ is not defined osterman.html:205
这篇关于懒加载不显示我的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!