1

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

a.litis
  • 443
  • 3
  • 12
  • 24
  • what browsers are you using? – Philip Bevan Apr 02 '13 at 21:02
  • @PhilipBevan Chrome, why? – a.litis Apr 02 '13 at 21:03
  • 1
    chrome debugger shows errors: Uncaught SyntaxError: Unexpected identifier jquery.js:9598 Uncaught SyntaxError: Unexpected identifier lazyload.js:228 Uncaught ReferenceError: $ is not defined osterman.html:205 which suggests your implementation is incorrect. Try looking at downloading the files again. Try using //ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js as your jquery src – Philip Bevan Apr 02 '13 at 21:12
  • 1
    and try using http://cdnjs.cloudflare.com/ajax/libs/jquery.lazyload/1.8.4/jquery.lazyload.min.js as your lazyload src. Once this is done download these two files, if working and use these. – Philip Bevan Apr 02 '13 at 21:19
  • can you mark my answer as correct. i will edit in full tomorrow – Philip Bevan Apr 02 '13 at 22:34

2 Answers2

1

Your JS does seem to throw an error. On the bottom of your jquery.js file seems to be invalid code:

...
})( window );
Window size: x 
Viewport size: x

The last two lines cause the error and prevent any further JS execution.

Steve
  • 8,609
  • 6
  • 40
  • 54
0

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

Philip Bevan
  • 347
  • 1
  • 12