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 March 6th, 2013, 04:22 PM
lelales lelales is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2008
Posts: 603 lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 4 Days 1 h 45 sec
Reputation Power: 37
Animating opacity with jQuery

I'm trying to animate the opacity of an image over about 2 seconds of time.
I set the "opacity" in the css to 0 and tried to transform the opacity to 100 using jQuery.
I did some research and noticed a lot of differentiations for different browsers.
Is there an easy was to do this? I could not figure it out.

Any ideas etc. are appreciated.
thanks

Reply With Quote
  #2  
Old March 6th, 2013, 05:36 PM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Dev Shed God 7th Plane (8000 - 8499 posts)
 
Join Date: Dec 2004
Posts: 8,057 E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 1 Day 5 h 51 m 35 sec
Reputation Power: 7104
Something like this should do it:
Code:
$('#element').animate({opacity: 1}, 2000);


There's an example of animating opacity on the documentation page for the animate function.
__________________
PHP FAQ
How to program a basic, secure login system using PHP
Connect with me on LinkedIn


Quote:
Originally Posted by Spad
Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

Reply With Quote
  #3  
Old March 6th, 2013, 07:55 PM
lelales lelales is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2008
Posts: 603 lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 4 Days 1 h 45 sec
Reputation Power: 37
thanks E-Oreo

your solution worked great!!

thanks again

Reply With Quote
  #4  
Old March 6th, 2013, 07:59 PM
Jacques1's Avatar
Jacques1 Jacques1 is online now
pollyanna
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 2012
Location: Germany
Posts: 2,036 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 6 Days 21 h 29 m 56 sec
Reputation Power: 812
Hi,

there's fadeIn() for exactly this purpose.

Reply With Quote
  #5  
Old March 6th, 2013, 08:06 PM
lelales lelales is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2008
Posts: 603 lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 4 Days 1 h 45 sec
Reputation Power: 37
thanks Jacques1

I found the precious work around a little buggy. I will test your idea soon.

thanks again!!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Animating opacity with jQuery

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