You could cancel the submit (stick with return false) and submit again after the animation finished.
$(".advancedSearchForm").submit(function(){ var form = this; $(".colorList").slideToggle("fast", function(){ $(this).html("<p>loading</p>"); $(this).slideToggle("slow", function() { form.submit(); }); } ); return false; }); Jörn On Fri, Aug 29, 2008 at 4:09 PM, Boersnoes <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm trying to animate my page before a form is submitted (regular, no > ajax). > > $(".advancedSearchForm").submit(function(){ > $(".colorList").slideToggle("fast", > function(){ > $(this).html("<p>loading</p>"); > $(this).slideToggle("slow"); > } > ); > return false; > }); > > If i end with return false, the animation works fine but the form > never submits. > Whith return true, the animation is skipped and it goes straight to > the submit. > > Any clues? >