anythingslider navigationsize not working on first load firefox 26

179 views Asked by At

I'm having weird problems with anythingslider.js using navigationsize. It's working properly with Chrome, IE, but on FireFox it only shows 1 slide. I checked the code of anythingslider.js and it seems that jquery outerWidth is not working properly on FireFox only on first load of the site. When you refresh it works. Demo here -> http://gen4games.com/softlaunch/

View on FireFox, then on Chrome.

Please help. Thank you!

1

There are 1 answers

4
Mottie On

Hmm, that is weird... the problem appears to be that the thumbnail images aren't loaded when the navigationSize width is calculated. I haven't tested this, but setting the thumbnail image width should fix this issue. Try something like this:

CSS

.thumb { width: 80px; }

Script (just change the navigationFormatter to include the above class name)

navigationFormatter : function(i, panel){
    return '<img class="thumb" src="images/slides/thumbs/' + ['slide.1', 'slide.2', 'slide.3', 'slide.4', 'slide.5', 'slide.6' /*, 'slide.7' Uncomment to add another video.*/][i-1] + '.jpg">';
},