JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 10th, 2013, 05:57 PM
BlackAce BlackAce is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2010
Posts: 164 BlackAce User rank is Sergeant Major (2000 - 5000 Reputation Level)BlackAce User rank is Sergeant Major (2000 - 5000 Reputation Level)BlackAce User rank is Sergeant Major (2000 - 5000 Reputation Level)BlackAce User rank is Sergeant Major (2000 - 5000 Reputation Level)BlackAce User rank is Sergeant Major (2000 - 5000 Reputation Level)BlackAce User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 17 h 37 m 21 sec
Reputation Power: 43
FadeOut('slow') not working. <span> just disappears.

EDIT: Nevermind, apparently fadeOut cannot be applied to a span, since it worked when I changed it to <p>.

This should be pretty easy. Can one of you take a look at this code snippet and let me know if you see anything wrong.

Basically, it's a line of text contained in a <span>, and I'd like it to fade away after 4 seconds. Instead, there is no fade effect, it just disappears after 4 seconds.

Code:
<script type='text/javascript'>
	$(document).ready(function(){
		setTimeout(function(){
			$('#success').fadeOut('slow'); 
			}, 4000);		
	});
</script>

Last edited by BlackAce : January 10th, 2013 at 06:02 PM.

Reply With Quote
  #2  
Old January 10th, 2013, 10:22 PM
web_loone08's Avatar
web_loone08 web_loone08 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2008
Posts: 606 web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 17 h 1 m 3 sec
Reputation Power: 69
Quote:
Originally Posted by BlackAce
EDIT: Nevermind, apparently fadeOut cannot be applied to a span, since it worked when I changed it to <p>.


It might be because you do not have the <span> element set to a block level element, as it is a inline element by default. The <p> element is a block level element by default. This is just a guess; but you might could set the <span> element to a block level element and it may fade out, as well.
Comments on this post
Kravvitz agrees!
BlackAce agrees: You are absolutely correct.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > FadeOut('slow') not working. <span> just disappears.

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap