That worked. Still learning but I'm learning kinda backwards: jQuery first then basic javascript!
Thank you. On Feb 1, 9:46 am, "frederik.r...@gmail.com" <frederik.r...@gmail.com> wrote: > When do you call the hover-function? On $(document).ready? To me it > looks like the hover won't work because it is never applied to the > next photo (as it isn't a current-class when loaded). Maybe it should > go like this: > > function addMyFunctionality() { > $('.current img.after').hover( > function() { > $(this).animate({opacity: "0"}); > }, > function() { > $(this).animate({opacity: "1"}); > } > > $('.current').click(function() { > $(this).removeClass('current').addClass > ('invisible'); > $(this).next('div').removeClass > ('invisible').addClass('current'); > addMyFunctionality(); > > });