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

5
  • what browsers are you using? Commented Apr 2, 2013 at 21:02
  • @PhilipBevan Chrome, why? Commented Apr 2, 2013 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 Commented Apr 2, 2013 at 21:12
  • 1
    and try using cdnjs.cloudflare.com/ajax/libs/jquery.lazyload/1.8.4/… as your lazyload src. Once this is done download these two files, if working and use these. Commented Apr 2, 2013 at 21:19
  • can you mark my answer as correct. i will edit in full tomorrow Commented Apr 2, 2013 at 22:34

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.