0

I am using this script:

<script language="javascript" type="text/javascript">
     $(window).load(function() {
     $('#loading').fadeOut(2000);
  });
</script>  

... and a ajax.loader.gif in a div:

<div id="loading">
  <img id="loading-image" src="img/ajax-loader4.gif" alt="Loading..." />
</div>

... to load the page because of a flickering slider that I am hiding before its finished loading. Right now the script works for the whole page, and I don't want that, because it´s taking too long. is it possible to make that loader finish as soon as that slider is loaded? that would mean I need to exclude som divs from that loader I guess.

Any Ideas?

Ove
  • 1
  • 1
  • Unfortunately not. The `load()` event only fires on the `window` – Rory McCrossan Mar 22 '17 at 16:05
  • Or you can hide all your class content for the first load of the page, then show it when the slider(images) already loaded. You can check this http://stackoverflow.com/questions/26480844/how-to-know-if-all-elements-in-a-div-have-been-fully-loaded to know whether the slider(div class) been fully loaded. – c.k Mar 23 '17 at 08:37

0 Answers0