javascript - bxslider does not wait for images in chrome; jumps to last slide -



javascript - bxslider does not wait for images in chrome; jumps to last slide -

if go http://sandkasse.shoporama.dk/, see bxslide @ top of page. @ least, if not utilize chrome (peculiarly, problem seems not occur in safari, ie or firefox).

i experiencing problem quite when loading page chrome, images used in bxslider no load. refreshing solves problem. 2 buttons switching slides, nil happens when these clicked.

i don't error messages.

i assuming problem images have not finished loading when $('.bxslider').bxslider(); called within $(document).ready(function(){}). however, prepare this? if move bxslider phone call window.load, ugly result images in slide shown until whole page has finished loading, wrong width , styling. suppose alter visibility , styling of images until page finishes loading, seems more hack solution?

would sensible selection utilize sort of imagesloaded event instead of document.ready? imagesloaded bundle included anyway. but, suspect run same problem of images showing until lastly had loaded?

a related problem may fact slider skips lastly slide when page loaded, irrespective of browser used. have "fixed" setting "startslide" manually.

i hope question makes sense. aware there lot of bxslider questions on here, haven't been able find solving particular problem, except people "giving up" , resorting hiding images while things load?

i may have come suitably non-hacky solution:

reload slider in window.load call. thus, bxslider phone call has transformed into:

var slider; // has defined beforehand can utilize in window.load $(document).ready(function(){ //initialize slider slider = $('.bxslider').bxslider({ startslide:0 }); };) $(window).load(function() { slider.reloadslider(); });

javascript google-chrome bxslider

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -