Hello all,

I am trying to fade in some content, but it's not working correctly. I got
some code at the Nettuts tutorial at
http://nettuts.com/javascript-ajax/how-to-load-in-and-animate-content-with-jquery/
and changed it a bit so it just fades in and out. 

The fading sort of works, but there are a few problems. 

In Firefox, the page loads perfectly. When you click on the 'Second Content
Area' button, the content loads in correctly, but the jquery that controlled
the sprite's hover on the sidenav stops working. When you click back on the
'First Content Area', the content loads back in, but the jquery that
controlled the cycle plugin I had working on the slideshow no longer works.

In Internet Explorer, the page loads perfectly. When you click on the
'Second Content Area' button, the first content cuts away as well as the
side navigation and nothing loads back in. When you click back on the 'First
Content Area', the sidenav and content load back in, but the sidenav doesn't
work and the jquery that controlled the cycle plugin I had working on the
slideshow no longer works.

The jquery code that is doing the fading is:


$(document).ready(function() {
                                                
        $('#fadebuttons li a').click(function(){
                                                                  
                var toLoad = $(this).attr('href')+' #content';
                $('#content').fadeOut('fast',loadContent);
                
                function loadContent() {
                        $('#content').load(toLoad,'',showNewContent())
                }
                
                function showNewContent() {
                        $('#content').fadeIn('normal');
                }
                
                return false;
                
        });

});



I have the page here: http://idea-palette.com/testfolder/pagetest5.html

I'm very confused. Can someone please help me?


-- 
View this message in context: 
http://www.nabble.com/Content-not-fading-in-correctly-tp21576920s27240p21576920.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to