I think it is because you are fading it back before the content has loaded

try this:
 $('#list a').each(function(i){
    $(this).click(function(event){
        $("#list").fadeOut("slow").load(this.href, function () {
             $(this).fadeIn("slow");
        });
        return false;
   });
});

Haven't tested it, but what it should do is execute the fadeIn AFTER
the content has loaded.

//Kristinn
On 3/24/07, Sebastián V.  Würtz <[EMAIL PROTECTED]> wrote:
> Well maybe isnt the return my problem, really is the behaviour, why when i
> clicl in the link it disapear- "appear with the same content" and then
> appear within the data loaded via ajax? I mean i want the container only
> hide and show whitin the content loaded nothing more.
>
> Maybe my english is very bad, so sorry.
> Sebastian
>
>
> ----- Original Message -----
> From: "Evan" <[EMAIL PROTECTED]>
> To: <discuss@jquery.com>
> Sent: Friday, March 23, 2007 9:32 PM
> Subject: Re: [jQuery] return false
>
>
> By putting return false, you're preventing the default behaviour of
> the anchor, otherwise it would still fire like a normal link.
>
> Alternatively, you could use another element (like a span, styled like
> an anchor) to achieve the same effect.
>
> On Mar 24, 8:30 am, Sebastián V. Würtz <[EMAIL PROTECTED]> wrote:
> > I have a html like this
> >
> >    <div id="list">
> >     <ul>
> >         <li><a href="data/cat1.htm">cat1</a></li>
> >         ....
> >         ...
> >     </ul>
> >
> > The html
> >
> >  $('#list a').each(function(i){
> >     $(this).click(function(event){
> >         $("#list").fadeOut("slow").load(this.href);
> >         $("#list").fadeIn("slow");return false;
> >
> > })
> >
> > When i click in 1 option the "list" hide (fadeOut); load the page; appear
> > again the list; and then the page appear. If i dont put the "return false"
> > i got the empty page not like a "content"
> >
> > How i can fix it?
> >
> > Thx
> > Sebastián
> >
> > --------------------------------------------------------------------------------
> > Estoy utilizando la versión gratuita de SPAMfighter para usuarios
> > privados.
> > Ha eliminado 6225 correos spam hasta la fecha.
> > Los abonados no tienen este mensaje en sus correos.
> > ¡Pruebe SPAMfighter gratis ya!
> >
> > _______________________________________________
> > jQuery mailing list
> > [EMAIL PROTECTED]://jquery.com/discuss/
>
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
> __________ NOD32 2142 (20070324) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
> --------------------------------------------------------------------------------
> Estoy utilizando la versión gratuita de SPAMfighter para usuarios privados.
> Ha eliminado 6257 correos spam hasta la fecha.
> Los abonados no tienen este mensaje en sus correos.
> ¡Pruebe SPAMfighter gratis ya!
>
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to