You need to place your content inside the callback function for fadeOut. The callback is executed after the content is faded out.
$(document).ready(function() { $("#lakeview-gallery a").click(function(event) { $("#lakeview-placeholder").fadeOut(800, function() { // this content will start once the content is faded out var image = $(this).attr("href"); $("img#lakeview-placeholder").attr("src", image); $("#lakeview-placeholder").fadeIn(800); return false; }); }); }); On Apr 2, 11:10 am, stinkysGTI <jesse.gr...@gmail.com> wrote: > There's a pretty simple image replacement I'm trying to do, but can't > get the current image to fadeOut, and the new one to fadeIn. There's > only 3 images to choose from and always will be. With those 2 lines > commented out, it works, just obviously without any kind of fade. I'm > fairly new to jQuery, so any help would be greatly appreciated. > > $(document).ready(function() { > $("#lakeview-gallery a").click(function(event) { > // $("#lakeview-placeholder").fadeOut(800); > // $("#lakeview-placeholder").fadeIn(800); > event.preventDefault(); > var image = $(this).attr("href"); > $("img#lakeview-placeholder").attr("src", image); > }); > > }); > > The page can be seen here:http://www.lakeshoremontana.com/dev/floorplans.html