0

Okay so I have to make a website for my School's robotics team and I've installed a JQuery plugin for parallax scrolling, I learnt how to use it and frankly it was minimal use of JavaScript.

Although now I realized that my page is REALLY image heavy and it lags the site throughout the whole scrolling process, it just looks really bad. I've read many online descriptions for a preload, all with a similar layout although I still don't understand what I have to do.

Can anyone explain how a preload works and what information in what format I have to put it in?

Also if I was to have a preload loading interface, how would I integrate that? I have my .gif image, now what?

painotpi
  • 6,894
  • 1
  • 37
  • 70
Mohammad Al-Ahdal
  • 758
  • 2
  • 8
  • 21

2 Answers2

1

why not use lazy load plugin for jQuery?

jackchuka
  • 72
  • 2
1

If you are already using a jQuery Plugin, then just search for a jQuery Plugin which will preload images. One such plugin is jQuery Image Preload Plugin

This questions has also been answered already Preloading images with jQuery

Community
  • 1
  • 1
samazi
  • 1,161
  • 12
  • 24
  • function preload(arrayOfImages) { $(arrayOfImages).each(function(){ $('')[0].src = this; // Alternatively you could use: // (new Image()).src = this; }); } // Usage: preload([ 'Contents/Backgrounds/BG1 Smaller.jpg', 'Contents/Backgrounds/FRC.png', 'Contents/Backgrounds/IMG_1732.JPG', 'Contents/Backgrounds/IMG_1740.JPG', 'Contents/Backgrounds/IMG_1747.JPG', 'Contents/Backgrounds/NOBGTemp.png', 'Contents/Backgrounds/Robotics4.jpg', 'Contents/Backgrounds/Gallery BG.png' ]); Like this? I'm sorry, I'm a noob >. – Mohammad Al-Ahdal Jun 24 '13 at 08:39