I am working on a website for a client, and the main navigation menu is on a wavy ribbon type object. They want the ribbon to grow out of the left side of the page. I'm planning on using a simple flash animation to do that, but I don't want to make the menu buttons in flash, since flash is temperamental. I'm new to javascript, so this might be a dumb question. Is there a way I can set it up so the menu links are html, but use javascript to make it so the links don't show up until the ribbon has animated across the page and is in place?
Flash makes movies, right?
Can't you insert it as a movie in your html?
If you time your movie you can then use setTimeout to have the button appear/disappear after that amount of time.
In javascript there are functions that are event triggered onload is one of them:
<body onload="timer()">
Give your button an id let's say id="button"
<p id="button"><a href="">Link</a></p>
When the page loads the timer() function will be called.
<script language="Javascript">
function button_timeout() {
document.getElementById("button").style.visibility="visible"
}
function timer() {
setTimeout('button_timeout', 2000);
}
</script>
The setTimeout funcion will call the button_timeout function when 2 seconds have elapsed. Declare the button element as having visibility:hidden in CSS and after 2 seconds this will change to visible.
I hope this helps, I didn't check what I wrote, let me know if there is a problem.
Bookmarks