Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.