On the web site I am building http://dev-rico-v2.virtualhorizons.com/ I would like the menu in the first button "Designer Series" to open shortly after the page loads be visible for about 2 seconds then close. Would I use the setTimeout() or setInterval() function to do this and what would the script look like?
I tried setInterval and the menu shows up but I can't close the menu after I clear the Interval. <script type="text/javascript"> setInterval ( "showMenu()", 1000 ); function showMenu() { // (do something here) Show('designer_menu') } clearInterval ("hideMenu"); function hideMenu() { Hide('designer_menu') } </script> Code (markup):
ok, I figured it out //call showMenu function when page loads setTimeout ("showMenu()",1000); //show menu function showMenu() { Show('designer_menu'); setTimeout ( "hideMenu()", 2000 ); } //hide menu function hideMenu() { Hide('designer_menu'); } Code (markup):