Jump to content

Fade in Fade out effect issue


solon

Recommended Posts

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&#8217;s <strong>FREE!</strong> </p> <p>After all, it&#8217;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&#8217;s <strong>FREE!</strong> </p> <p>After all, it&#8217;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...

Link to comment
https://forums.phpfreaks.com/topic/214168-fade-in-fade-out-effect-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.