where is the click function in your javascript? I don't see it in the snippet you posted.
it may work better to fade out the loading div as a callback to your load method: $('#content').load('/<?php echo $url ; ?>/profile/', function(){ $('#load').fadeOut().remove(); }); On Aug 6, 9:17 am, "Dave Maharaj :: WidePixels.com" <d...@widepixels.com> wrote: > I have append to add a loading div. But once loaded i want to fade it out > and remove it. > > I have: > <script type= "text/javascript">/*<![CDATA[*/ > $(document).ready(function(){ > $('#content').append('<div id="load"></div>'); > $('#load').fadeIn('normal'); > $('#content').load('/<?php echo $url ; ?>/profile/'); > $('#load').fadeOut('normal' , function() { $('#load').remove(); }); > > }); > > </script> > > But it does not remove the #load div...so looking at firebug the load div > gets added everytime a user clicks a link > > <div id="load" style="display: none;"/> > <div id="load"/> > <div id="load"/> > <div id="load"/> > <div id="load"/> > > How can I remove the div once it done loading? > > Dave