Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [js] problem z preloaderem
tomeknh
post
Post #1





Grupa: Zarejestrowani
Postów: 90
Pomógł: 0
Dołączył: 2.12.2007

Ostrzeżenie: (0%)
-----


witam,

mam kod od preloadera obrazków

  1. (function($) {
  2. var cache = [];
  3. // Arguments are image paths relative to the current page.
  4. $.preLoadImages = function() {
  5. var args_len = arguments.length;
  6. for (var i = args_len; i--;) {
  7. var cacheImage = document.createElement('img');
  8. cacheImage.src = arguments[i];
  9. cache.push(cacheImage);
  10. }
  11. }
  12. })(jQuery)
  13.  
  14.  
  15. jQuery.preLoadImages('files/img/preloader.gif');



i problem w tym, ze laduje dosc duza ilosc obrazkow

przez czas ladowania tych obrazkow zacinaja sie pozostale funkcje javascriptu np. zmiana obrazka po najechaniu na przycisk itp. dopiero po zaladowaniu wszystkich obrazkow strona sie odblokowywuje

co zrobic
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 13:37