Waiting for images loaded to be run [SOLVED]
Hello there,
I embedded a s3slider jquery plugin which has a sequence of more than 80 pictures.
That causes a problem when loading the page, since when the slider starts the page completion get stuck.
To overcome this I thought I could make it run after $(window).load
and somehow it starts running after the page content is fully loaded but ... it has to wait for the whole set of 80 pictures which is not very practical.
I made this kind of solution: first it has to fully load the page content and graphics, except for the imgs under the slider, once that's done, instead of waiting for all the 80 pictures, it has to start running after the first 3 pictures of the banner are loaded...
but this doesn't work...
- <script type="text/javascript" language="javascript">
- $(document).ready(function() {
- $(window:not('li.bannerImage img')).load(function () {
- $('li.bannerImage img:lt(3)').load(function () {
- $('#banner').removeClass('loading');
- $('#banner').s3Slider({
- timeOut: 8500
- });
- });
- });
- });
- </script>
what's wrong with that?
Any better solution?