Fade in on load?

This is a discussion on "Fade in on load?" within the JavaScript Forum section. This forum, and the thread "Fade in on load? are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Nov 6th, 2007, 15:51
Reputable Member
Join Date: Sep 2007
Location: UK
Age: 42
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Fade in on load?

Was just doing some looking around, came across this site. when i clicked on the link from google in fades in to the page somehow, curious to know how it's done! great effect!

http://www.ihaveawebsite-nowwhat.co.uk/

not sure if you can see it, im using IE 6.

EDIT

it doesn't work in that link so it's the fourth down on this search

http://www.google.co.uk/search?hl=en...ff&q=seo&meta=
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Nov 6th, 2007, 16:00
Reputable Member
Join Date: Jun 2007
Location: Bellevue, SK, Canada
Age: 29
Posts: 222
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Fade in on load?

hmm.. doesn't seem to work in FireFox..

[edit] It works in IE7.. I see what you mean.. try hotscripts.com seems like Javascript..

Last edited by delusion; Nov 6th, 2007 at 16:04.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Nov 6th, 2007, 16:52
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Fade in on load?

Yeah ... those are IE only styles ... like the scrollbar thingy.

Moving to JS forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Nov 7th, 2007, 10:47
Up'n'Coming Member
Join Date: Jun 2007
Location: Germany
Age: 23
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Fade in on load?

You can try some Javascript here.. *g*
Code: Select all
<html>
<head>
<script type='text/javascript'>
var timer;
var opacity = 0;

function fadein()
{
opacity += 1;

document.body.style.opacity = opacity/10;
document.body.style.filter = 'alpha(opacity=' + opacity*10 + ')';

if(opacity == 10)
window.clearInterval(timer);

}

onload = new Function("timer = window.setInterval('fadein()',100);");

</script>
</head>
<body style='opacity:0; filter:alpha(opacity=0);'>
[BODY IN HERE]
</body>
</html>
See in action here: http://projects.lucleonhart.de/fade.html
Works in all Browser i can test (FF, IE, Opera, Safari)

Last edited by Lucleonhart; Nov 7th, 2007 at 10:51.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Nov 8th, 2007, 15:21
Junior Member
Join Date: Nov 2007
Location: Norwich, UK
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Fade in on load?

When it comes to creating visual effect, stay away from any browser dependent code and give either scriptaculous or jquery a try.

Sales folk love transitions

James.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Nov 8th, 2007, 18:24
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Fade in on load?

That works in both IE6 and FF.
I quite like it! But I'm not sure what happens when you lots of images loading etc.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Nov 9th, 2007, 07:10
Up'n'Coming Member
Join Date: Jun 2007
Location: Germany
Age: 23
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Fade in on load?

That code is quite browser independent my friend.. you may add
Code: Select all
document.body.style.KhtmlOpacity = opacity/10;
to support Konquerer and Safari.

I've added that to my startpage.. works great. (Reload page after all gfx has loaded to see the full effect ^^)
http://www.lucleonhart.de/index2.php
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Video player preview Image fade to video Lchad Flash & Multimedia Forum 10 Sep 4th, 2007 15:37
fade out when new movie? becccs Flash & Multimedia Forum 2 Jul 28th, 2007 12:53
Mutiple images fade in and out peebman2000 Flash & Multimedia Forum 5 Feb 15th, 2007 19:05
fade to white christopher Graphics and 3D 2 Jun 1st, 2006 12:02
Fade Out Option in sounds not working autumn_whispers2me Flash & Multimedia Forum 2 Feb 14th, 2005 21:37


All times are GMT. The time now is 18:01.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42