I watched the animation with the IE developer toolbar, and noticed a couple
of oddities.

Firstly, the CSS for the divs are set to both position:absolute and
float:left.  This is not the source of the problem (I overwrite to
float:none and tried it), but float:left is unnecessary if with absolute
positioning.

Anyway, then I monitored the left: position as the animations happened.

While going to the right, everything went as usual.

Div#0    0% to -50%
Div#1   25% to -25%
Div#2   50% to   0%
Div#3   75% to  25%
Div#4  100% to  50%
Div#5  125% to  75%

All good.

Then I refreshed and tried going to the left.

Div#0    0% to  50%
Div#1   25% to  75%
Div#2   50% to 100%
Div#3   75% to 125%
Div#4  100% to  45%
Div#5  125% to  48%

As you can see, divs 0-3 were fine.

Divs 4 and 5 got WEIRD settings.

Now, I tried stepping through the code, but your jQuery is minified.

My guess is there is something wrong with the animate('left','+=50%');

Cheers,
JK
-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ^AndreA^
Sent: Saturday, November 22, 2008 3:29 PM
To: jQuery (English)
Subject: [jQuery] animate problem with IE7


Hi all,

I'm working on a slideshow/carousel:
http://www.lesperimento.netsons.org/various/my_carousel/

It's works fine except than in IE7/6 (basically as usual... ;-) )

It's weird also because the "next button/arrow" works well under IE
but NOT the "prev button/arrow"; and that's the problem.

I explain briefly how the script works.

When you click the arrows you call next_f(); and prev_f(); that do
exactly the same thing but in different direction.
They call three functions:

1) choose_element_to_move(some_params); it's quite clear the meaning,
anyway it choose which <li> elements have to be moved.

2) place_elem_right_pos(some_params); once it knows which elements
have to be moved, it moves them in the right position and ready for
the animation.

3) move(elem,imgs); it moves the elements...
"elem": is an array containing all the id of the elements to move
"imgs": is an int, it's the number of images to move (I need it
because via php ,when the page is generated, I can change the number
of elements)

The problem is in move(elem,imgs), in this part that is the
prev_button where "sing>0":

JS:
else if(sign>0) //prev button
        {
                for(var i=imgs-1; i>=0;i--)
                {
                        $('#' + elem[i]).animate({
                                left:  '+=' + perc + '%'
                                },
                                1000);
                }
      }

I cut part of the code that was not useful for the purpose...

Basically it does not do anything else than taking each element to
move e move them, but I don't understand why it does not want to work
with IE. arghhh!!!

any idea?!?

I'm sure the problem is in this part of code because before I was
using another function instead of animate (two setTimeout in cascade)
and was working also under IE (I'm trying to use animate because is
much much smoother).

If you are still reading, thanks for your time... hehe...


Reply via email to