Skip to content

Instantly share code, notes, and snippets.

@netguru
Created November 26, 2008 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netguru/29362 to your computer and use it in GitHub Desktop.
Save netguru/29362 to your computer and use it in GitHub Desktop.
site={
config:{
preloaded_images:['button_1_hover.png', 'button_2_hover.png', 'footer_link_hover.png'],
images_rel_path:"/images/"
},
preload_images:function(){
jQuery.each(site.config.preloaded_images, function(){
jQuery("<img>").attr('src', site.config.images_rel_path + this);
});
},
init:function(){
this.preload_images();
}
};
$(document).ready(function(){
site.init();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment