From 79cab287ccb5bb9e22bafd1b55a2ee4803aa3701 Mon Sep 17 00:00:00 2001 From: Julian Pustkuchen <Julian@Pustkuchen.com> Date: Mon, 24 Mar 2014 12:17:39 +0100 Subject: [PATCH] Fixed bug with loading of /undefined path due to the former .js image preloading. --- jquery_loadinganimation.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/jquery_loadinganimation.js b/jquery_loadinganimation.js index d64df4d..beb0367 100644 --- a/jquery_loadinganimation.js +++ b/jquery_loadinganimation.js @@ -92,10 +92,6 @@ // object after init! Drupal.behaviors.jquery_loadinganimation.Loadinganimation = this; - // Preload images. - jQuery.preload_images(Drupal.settings.basePath - + Drupal.settings.jquery_loadinganimation.img_src); - /** * Displays the loading animation. */ @@ -116,22 +112,6 @@ }; }; - /** - * Preload images via jQuery. - */ - (function($) { - var images_cache = []; - // Arguments are image paths relative to the current page. - $.preload_images = function() { - var arg_length = arguments.length; - for ( var i = arg_length; i--;) { - var image_to_cache = document.createElement('img'); - image_to_cache.src = arguments[i]; - images_cache.push(image_to_cache); - } - }; - })(jQuery); - /** * Initialization */ -- GitLab