Why not just use something like this: http://plugins.jquery.com/project/loading
On Tue, Nov 10, 2009 at 5:37 AM, artesianwells <joshua...@gmail.com> wrote: > Hello, > > I would like to add css through jquery to make a loading gif appear. > Say in the css stylesheet itself, #vv is set without a width, so I was > hoping to put a width on the css loading gif background image in > jquery to make it appear. If this is not possible to do in jquery, > then a style:non alternative and then making the css show in jquery > would be fine. unfortunately I do not know how to do either of this in > jquery or how to make the gif fade in and out. The concept syntax (non > working) I had in mind is below. (Note: If wondering, I have 3 divs on > my website to be loading in a slider, but only the first div needs to > show the loading gif, the first slide) > > > $(function(){ > > $("#first").empty().fadeIn(80)$('#vv').css('width:48px').fadeOut(500); > $("#first").load("ahahpage.html #u"); > $("#second").load("ahahpage.html #k"); > $("#third").load("ahahpage.html #b"); > > }); > > Thankyou >