OK, I added a call to stop before the call to fadeIn, and it seemed to do the trick. What's bothering me though, is that when the event that calls fadeIn is called, there is not supposed to be any animation to stop. So the question is, why does it need to be stopped? And should I make it a habit to stop animations before starting new ones, even in cases where I theoretically shouldn't need to stop?
Thanks for the support! Perrin4869 On Jul 31, 3:50 pm, Perrin4869 <juliangrinb...@gmail.com> wrote: > I do use it, in fact, the line that triggers the animation is: > > this.currentImage.stop().fadeTo(300, 0, createObjectCallback(this, > this.FadeInGalleryImageFaded)); > > On Jul 31, 3:16 pm, Leonardo K <leo...@gmail.com> wrote: > > > Try to use the stop function before the animation start > > >http://docs.jquery.com/Effects/stop > > > On Thu, Jul 30, 2009 at 18:37, Perrin4869 <juliangrinb...@gmail.com> wrote: > > > > I guess I'll make it much easier if I strip all the surrounding stuff > > > in the webpage, and use the uncompressed version of jQuery. > > > Here's the updated demo, which still has the problem: > > > >http://79.182.22.144:1118/fadein_gallery.html > > > > On Jul 30, 6:59 pm, Perrin4869 <juliangrinb...@gmail.com> wrote: > > > > Hello, > > > > > I'm building a jQuery based gallery, in which the images fade in or > > > > out whenever the user hovers over the thumbnail. Now, for some reason, > > > > everything works fine for the first couple of hovers, but after a > > > > while, it starts to lag greatly after each hover. Here's the page I'm > > > > talking about: > > > > >http://79.182.22.144:1118/he/גלריית_תמונות.html > > > > > (Sorry for giving a link to my localhost, I don't have a server to > > > > store it right now) > > > > > A little explanation about the script: > > > > > The class called FadeInGallery inside "/features/FeatureGalleryFadeIn/ > > > > fade_in_gallery.js" is used to initilize the gallery from the existing > > > > markup. You make a new instance of it, initialize it, and the gallery > > > > is ready to go. > > > > I also used some scripts I found for hooking up events and for > > > > creating callback functions with correct "this" objects, which can be > > > > found in "/scripts/events.js" and "/scripts/helper.js" respectively. > > > > > Thanks for the support, > > > > Perrin4869