I have a regular html button that is styled with css that includes a background image. When the button is clicked it calls a js function which performs a location.href = 'http://stackoverflow.com/questions/12737088/page.aspx'. Prior to calling that, I would like to swap out the background image of the button.Here is what I have so far:\[code\]function InitiateNewLocalForm(sender, FormGuid) { setTimeout($(sender).attr('class', 'Loading20'), 100); location.href = 'http://stackoverflow.com/questions/12737088/Forms/InitializeNewForm.aspx?FormGuid=' + FormGuid}\[/code\]sender is the button that triggered this.If I remove the location.href part it works fine. It swaps out the class of the button to Loading20 which has the animated gif as the button background. However when I run it with the location.href, the animated image does not show up at all. The class of the button changes and the old background image disappears but the new one does not appear. I have run into this before in the past and using setTimeout worked. I'm stumped.Jason