Login

Save Password - Forgot Pass?
Not a member?
Become a DC
member now!



         Info
Author: Dan Pupius

Works in: NS6 IE4+

Downloaded:93451 times
View script

History
No history...

Rate script:
         Search
Search string:


Written by:


Date:


Order by:


Search


By category:


All scripts:

DotMenu
Written 07/30/2001 by Dan Pupius. Last updated 09/13/2001.

This is an expanding menu system based on an idea seen at DoubleYou.com.

Instructions

  • Set up the styles for dot, dotempty, dotoff and caption.

  • Create the base menu object using:
    var menu = new menuObject(objName,xPos,yPos,caption,startRadius);
    Where objName in this example = "menu"
    xPos and yPos = start position of menu
    caption = text
    startRadius = base distance of subMenus

  • Display and hide menu and caption using menu.show(), menu.showcaption() and menu.hide() and menu.hideCaption()

  • Move menu using menu.moveMe(x,y) or menu.moveBy(dx,dy) (moveMe is relative to parent's position or (0,0) if no parent)

  • add item's using sub = menu.addItem(caption, action) where action is a string that is evaluated when you click the dot (use "toggle" if you want it to open the submenu)




More detailed instructions can be found in the code.

Dan has also made an extra page with some more advanced examples of how to set the actions for the dotmenu. You can view the source to see how the actions were done.

Source
You have two options on getting the source to this script.

1. Copy the source from the textboxes below and place the code inside the body textbox in the body of your document and the code in the head textbox in the head of your document. If there are images to the script right click on the images below the textboxes and choose "save as" to get them.

2. Download the sourcecode and images in a zip file

Head


Body

All the free scripts on this site may be reused as long the copyright notice is intact in the script source. If you wish to use any of the scripts without the copyright notice contact us at copyright@dhtmlcentral.com.

Donations

Though all scripts on this site is free you have the ability to donate to the site to help freeing up my time to make the scripts (and the rest of the site) better.

For more info see donations.

Copyright © 2000-2002 DHTMLCentral.com, Bratta Communications. All rights reserved.