Hello,
I have photo gallery. Images are listed in a single container:
- <div>
- <img id="img_1" src="">
- <img id="etc" src="">
- <img id="img_3">
- <img id="etc" src="">
- <img id="etc" src="">
- <img id="etc" src="">
- </div>
The dragging works fine. What I want to do is when I drag the image, for example #img_3, is move the two images around it in exact relation to it as I drag it. Think of all the images in a horizontal line. Only one image shows at a time. I just can't figure out how to attach the two images (on either side of it) to the draggable image as it's moving so I can change their position on the fly. Currently I simply have this for the draggable image:
- $('#portfolio_items img').draggable({
axis: "x"
});
Is there someway to actually drag the other two images at the same time in exact relation to the image being dragged?
I thought about simply attaching an event to the image being dragged and move the other images on the fly, but couldn't figure out how to do that.
Any help would be appreciated.
Thanks,
Glen