Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 04-08-2011, 07:35 PM
scgroove's Avatar
scgroove scgroove is offline
Contributing Member
 
Join Date: 01-17-11
Location: Chicago
Posts: 57
iTrader: 0 / 0%
Simple jquery image fadeIn()

This should be the simplest thing ever ... but I can't seem to figure it out. All I'm trying to do is fade in two images upon document ready.

It's the two main images on either side of the main body area ... they should each fade in when the page loads ... I may eventually like to delay the start of the right side animation by a second or so ...

http://www.savagepixels.com/wildChild/

Here's the jquery code in my script.js file
HTML Code:
// image fading $(document).ready(function() { $('#leftSideFade').fadeIn(1500); $('#rightSideFade').fadeIn(2500); });
What am I missing?

Thank you.
| scott

Last edited by snakeair; 04-08-2011 at 10:46 PM.
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 04-09-2011, 12:41 AM
mad's Avatar
mad mad is offline
Junior Member
 
Join Date: 10-11-09
Location: Bulgaria
Posts: 21
iTrader: 0 / 0%
I guess you have to hide the images first
Quote:
<style>
#leftSideFade {display:none;}
#rightSideFade {display:none;}
</style>
 
Reply With Quote
  #3  
Old 04-09-2011, 11:19 AM
nemrod's Avatar
nemrod nemrod is offline
v7n Mentor
 
Join Date: 12-21-10
Location: Sweden
Posts: 463
iTrader: 0 / 0%
Quote:
Originally Posted by mad View Post
I guess you have to hide the images first
Indeed.

You might want to hide them with jQuery instead of CSS though, so visitors without JS will still see them.
 
Reply With Quote
  #4  
Old 04-09-2011, 10:24 PM
scgroove's Avatar
scgroove scgroove is offline
Contributing Member
 
Join Date: 01-17-11
Location: Chicago
Posts: 57
iTrader: 0 / 0%
Oh yeah ... that would seem to make sense ... how do you fade something in if it's already at 100% opacity ... thanks.

Good call on the jquery too ... I'll do that now.

Thanks.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
simple jquery help needed - run script at docu ready imadam Coding Forum 1 11-05-2010 02:18 AM
Free PHP Simple Image Gallery Script crivion Content 1 01-02-2010 07:19 AM
Simple JavaScript help please - image embedding Jason Coding Forum 5 06-16-2009 01:55 PM
looking for a simple image upload/thumb script solidad Coding Forum 0 08-31-2005 08:42 AM
Really SImple Sig Image Brian Graphic Design Forum 8 08-01-2004 03:40 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 05:32 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC