View Full Version : JQuery and Sliding effect

05-03-2007, 03:11 AM
Hey all, I'm new to JQuery. I am using one of Interface Elements slide effects (http://interface.eyecon.ro/docs/fx) which I assume is just a modification of JQuery's up and down slide. Now, when I implement this, it works fine until I try to do too many things on one onClick statement:

<a href="#" onClick="$('#nowshowing').SlideOutLeft(500);
$('#thumb2').fadeTo('slow', 0.5);
return false;">
<img id="thumb2" src="image.jpg"></a>

It works, but it doesn't work well. It slides out left... flashes the picture centered again for a split second... then slides in right. It is this flash that sometimes happens that I'm trying to fix. I should mention that Firefox is having this issue, and IE 7 ironically displays it smoothly with no flashing. The fadeTo just fades out the thumbnail of the picture I just clicked on, and it works fine. How should I break up this onClick? What I'm really going for here is to use this to display multiple pages of one image set. The user clicks on an icon, it brings up the image in large view (the #nowshowing layer) and then you can click on buttons to slide to the next image in the set. Yeah, I know my code slides in the same image as it slides out, but I was going to work on that later.

Even if I can get this working smoothly... it will still have to slide out completely before sliding in the next image. This is okay, but ideally, I would like something similar to Apple.com's gallery that slides perfectly (http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore?family=MacBook - click on Gallery in the middle). Anyways, any help would be very much appreciated. Let me know if I'm doing something that requires me to use more than just the built in effects.