iosscripts / iosslider

iosslider is a jQuery plugin which allows you to integrate a customizable, cross-browser content slider into your web presence. Designed for use as a content slider, website banner, or image gallery.
http://iosscripts.com/iosslider
432 stars 103 forks source link

iOsSlider takes forever to load #349

Closed notor closed 9 years ago

notor commented 9 years ago

It seems iOsSlider doesn't fully load until the entire page and all images are finished loading.

I've got a slider with about 15 images in it. If I load the page on broadband speed it's fine, but if the internet is slow it takes ages for the slider to gain its "swipe" functionality.

Is there any way to get the slider to function before the entire page is finished loading?

Thanks for your reply.

marcwhitbread commented 9 years ago

Put your initialization in $(document).ready(); That fires on DOM ready, so before any images.

notor commented 9 years ago

Currently it looks like:

jQuery(document).ready(function($) {
    $('#slider_<?php echo $sliderrandomid ?>').iosSlider({

(...)

So that's firing on DOM ready, right?

notor commented 9 years ago

So in my Chrome DevTools Network waterfall I see iosslider nice and near the top. But I just verified that the sliding and the responsiveness of the slider don't initiate until the very last image has loaded. I used Fiddler to emulate a slower internet connection to confirm this.

Any ideas?