JavaScript
  Home arrow JavaScript arrow Using jQuery to Preload Images with CSS an...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Using jQuery to Preload Images with CSS and JavaScript
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2010-03-01

    Table of Contents:
  • Using jQuery to Preload Images with CSS and JavaScript
  • Review: creating an image preloader mechanism with plain JavaScript
  • Abstract the image preloading process with jQuery
  • Getting the jQuery-based preloader up and running

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Using jQuery to Preload Images with CSS and JavaScript


    (Page 1 of 4 )

    If you’re a web designer searching for a guide to implementing the most common graphic preloading methods available nowadays, then you've come to the right place. This five-part article series lets you accomplish this task by utilizing either a few basic style sheet properties or the functionality provided by client-side scripting. In this fifth part of the series, we'll employ the jQuery JavaScript library to assist in preloading our images.

    Even though the topic seems intimidating and somewhat obscure, preloading images on web pages is a fairly straightforward process that can be mastered with only an average background in CSS and JavaScript. That's all you need, really.

    Of course, if you've been a patient reader of the series and already went through all of the parts  previous to this one, then you now have solid knowledge of how to use a combination of CSS and JavaScript to create some simple, yet functional, image preloading mechanisms on your own (X)HTML pages. In the course of those tutorials I demonstrated how to accomplish this with a decent variety of code samples.

    To be more specific, I left off the last tutorial showing how to prefetch a set of sample images in the background by using just plain JavaScript, which speaks for itself about the simplicity of this process. However, the trends that rule the world of modern web design say that if something can be done with native JavaScript, it's quite probable that the same results can be obtained using the level of abstraction offered by jQuery. In keeping with this idea, in this last installment of the series, I'm going to demonstrate how to develop a small image prefetching application, which will base all of its functionality on the jQuery library to do its business.

    Ready to tackle the final chapter of this hopefully educational journey in preloading images with CSS and JavaScript? Then don't hesitate anymore; click on the link below and jump in!

    More JavaScript Articles
    More By Alejandro Gervasio


       · This last part of the series explains how to build an image preloader in a few easy...
     

    JAVASCRIPT ARTICLES

    - Dynamic Drop-down Menus: Javascript Progress...
    - Creating Drop-down Menus Using Progressive E...
    - Building Slide Shows Using Progressive Enhan...
    - Form Validation with Progressive Enhancement...
    - Validating Web Forms: an Introduction to Pro...
    - Ajax Progressive Enhancement: Reading Remote...
    - Ajax Image Requests: Progresive Enhancement ...
    - jQuery Image Gallery: Working with Progressi...
    - Progressive Enhancement in an Image Gallery
    - Building a Drop-Down Menu with the HoverInte...
    - Using All of the HoverIntent jQuery Plug-in`...
    - Controlling Mouseout Events with HoverIntent...
    - Using the Interval Argument of the HoverInte...
    - Tweaking the Sensitivity of the HoverIntent ...
    - Introducing the HoverIntent jQuery Plug-in







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek