solon Posted September 23, 2010 Share Posted September 23, 2010 Hey guys i know this might have been posted before but i couldnt find anything. My problem is with fade in fade out jquery effect. Here is the code: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script type="text/javascript"> function change(x) { if(x == '1') { $('#show').fadeOut(1000, function() { $('#show').innerHTML = '<div id="righttexttext"><p>We come at your place and discuss your ideas in order to </p><p>understand what you want to do. And it’s <strong>FREE!</strong> </p> <p>After all, it’s your website you should be happy with it.</p></div><div id="mangraphic"></div><div id="righttext2text"> <p> What is the <strong>Purpose </strong>of your website?</p> <p> What are the <strong>Goals </strong>you want your website to achive?</p> <p> What is your <strong>Target Audience</strong>?</p> <p> What kind of <strong>Content </strong>your clients want to find in your</p> <p> website?</p></div>'; document.getElementById("selectedbggraphic").style.top = '541px'; document.getElementById("1").style.color = "#292828"; document.getElementById("4").style.color = "#ffffff"; document.getElementById("3").style.color = "#ffffff"; document.getElementById("2").style.color = "#ffffff"; document.getElementById("5").style.color = "#ffffff"; }); $('#show').fadeIn(100); } else if(x == '2') { $('#show').fadeOut('slow', function() { $('#show').innerHTML = '<div id="righttexttext"><p>We come at your place and discuss your ideas in order to </p><p>understand what you want to do. And it’s <strong>FREE!</strong> </p> <p>After all, it’s your website you should be happy with it.</p></div><div id="mangraphic"></div><div id="righttext2text"> <p> What is the <strong>Purpose </strong>of your website?</p> <p> What are the <strong>Goals </strong>you want your website to achive?</p> <p> What is your <strong>Target Audience</strong>?</p> <p> What kind of <strong>Content </strong>your clients want to find in your</p> <p> Website?</p></div>'; document.getElementById("selectedbggraphic").style.top = '580px'; document.getElementById("2").style.color = "#292828"; document.getElementById("4").style.color = "#ffffff"; document.getElementById("3").style.color = "#ffffff"; document.getElementById("5").style.color = "#ffffff"; document.getElementById("1").style.color = "#ffffff"; $('#show').fadeIn('slow'); }); } } </script> When i call the function change() , fadeIn() and fadeOut() works exactly like hide() , show(). (no animation of fading) It might be something stupid but i cant find it Thanks for your help... Quote Link to comment https://forums.phpfreaks.com/topic/214168-fade-in-fade-out-effect-issue/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.