In the jQuery documentation under animate there is an example as
follows:

$("#go3").click(function(){
      $("#go1").add("#go2").click();
    });

which is used to transform 2 blocks below the example code.

I have an image carousel with 7 images in a row with right and left
pointing arrows at either end. The right one has an id of 'right' and
the left has an id of 'left'. I have the code working using a series
of parallel animations that moves them along and rotates the right
hand image back to the left hand end and the reverse for the left hand
arrow.

I also have the onclick code code for the image, id='i3', to left of
the centre image to get it to move to the centre position and all the
others to shuffle along one position as follows:

    $("#i3").click(function(){$("#right").click();});

simarly for the image, i5, to the right:

    $("#i5").click(function(){$("#left").click();});

Using the example code at the top I thought I could use

$("#i2").click(function(){$("#right").add("#right").click();}); ( I
also tried various combinations of #i3 and #right)

but it didn't work and I now see that this adds 2 simultaneous
animations, what I want is the animations to happen sequentially.

How do I do this?

Thanks

paul

Reply via email to