Fade in web page elements?
-
I want all the divs in my webpage to fade in from the background (maybe by changing the opacity element of a given div in css?) One after the other, after a set amount of time, based on how close to the top of the page they are. I tried to use dream weaver events, but all the options for event triggers had nothing to do with how long the page had been loaded. What is the best way to do this?
-
Answer:
Use jquery http://jquery.com/ - even though it's capable of lots, it's designed to make this sort of stuff very easy. You'd just make a simple JavaScript call to tell a named DIV to fade in on the page load (onLoad). jquery lets you chain together effects too, so you can tell it to delay fading something in after a different thing pretty easily. Look here for the docs on query's .fadeIn() command, which is what you'll use. http://api.jquery.com/fadeIn/ Here's a typical line of jquery that tells a DIV called "foo" to wait 800 milliseconds, then fade in over 400 milliseconds. $('#foo').delay(800).fadeIn(400); Have fun!
Max at Yahoo! Answers Visit the source
Other answers
Short answer: don't try. Loads of cross-browser issues, will need maintaining as minor browser releases are made and probably won't do a thing for the visitor. I'd do it by not rendering anything until the whole page has loaded and then firing off a script to change div properties in order. The net result will be that visitors hit the back button saying "it's too slow loading".
Sadsongs
Related Q & A:
- How To Zoom Web Page?Best solution by Stack Overflow
- How To Find Owner Of The Web Page?Best solution by networksolutions.com
- How can I secure my web page?Best solution by Information Security
- How to extract text from web page?Best solution by Stack Overflow
- How to fetch data from web page?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.