You don't ever remove the content inside of the div it looks like.

e.g.
If you want p.a to have content from p.b you need to:

var newContent = $('p.b').text();          //Could also use html(); or
load(); it
$('p.a').empty().append(newContent);  //Notice the empty!

Obviously you would want to fadeOut the content, empty your container,
append the new content (or load() it as you do now) then fade it back in.

hope this helps, if not feel free to email me back. =)


[EMAIL PROTECTED] wrote:
> 
> 
> Hi all, i wanted to update a div, depending on a click in my menu.
> I get both alert test-messages in both browserswith the right text,
> but AFTER the second alert in Firefox it goes wrong.
> The original content dissapears, but Instead of placing the new
> content, inside my content div,
> the original content shows up again??????
> 
> Usually things goes well in Firefox en IE gives the problem, but now
> its Firefox which gives me a headache..
> 
> Please, can someone give me a clue, cause i have tried for hours now,
> without any result.
> Thanks in advance for your time
> 
> Here is the code:
> 
> $(document).ready(function() {
> 
>     $('#nav1 li a').click(function(){
>               // test alert
>               alert("clicked on nav1..");
> 
>     var toLoad = $(this).attr('href');
>               // test alert
>               alert("content to load: " + toLoad);
>     $('#content').hide('normal',loadContent);
>     $('#load').remove();
>     $('#wrapper').append('LOADING...');
>     $('#load').fadeIn('normal');
>     function loadContent() {
>       $('#content').load(toLoad,'',showNewContent())
>     }
>     function showNewContent() {
>       $('#content').show('normal',hideLoader());
>     }
>     function hideLoader() {
>       $('#load').fadeOut('normal');
>     }
>     return false;
> 
>     });
> });
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Update-div-works-in-IE-but-not-in-FF--tp20549519s27240p20556167.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to