Slideshow works with Firefox but not with Safari
Hi there!
I have a - i think - simple question.
I made a simple Slideshow with this tutorial:
http://tutorialzine.com/2009/11/beautiful-apple-gallery-slideshow/
Not exactly the same, but the basic functions are from this script.
Here's the script for the slideshow:
- $(document).ready(function(){
- var totWidth=0;
- var positions = new Array();
- $('#slides .slide').each(function(i){
- positions[i] = totWidth;
- totWidth += $(this).width();
- });
-
- $("#slides").width(totWidth);
-
- $("#slidemenu ul li a").click(function(e){
- var pos = $(this).parent().prevAll(".menuItem").length;
- $("#slides").animate({marginLeft: -positions[pos]+"px"});
- e.preventDefault();
- });
- });
i also tried to travel through the DOM to get to the right div, but it didn't help..
The funny thing is, that any other div, except the #slides-div can be animated, and it works perfect with Firefox..
You can have a look at this slideshow here:
Slideshow
Maybe you can help me with this problem,
Greets,
Markus