Pop-It Menu Tutorial

W e will take the below style sheet piece by piece** and explain each reconfiguration and substitution* in certain parts of the stlye sheet.

*    There are certain parts of this style sheet that to alter the color, you must substitute for the word(s) that are there.
**    We have divided the style sheet into sections. This is to differentiate what part we are explaining. The separations are "Not" part of the script.
<!------------------------------->

Style Sheet Configurations

<style>
<!--

.menuskin{
position:absolute;
width:165px;
background-color:menu;
border:2px solid black;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
visibility:hidden;
}

<!---------- Part One (1) Of Style Sheet Is Above ---------->

<!---------- ~ Explanation For Part (1) Is Below ~ ---------->

<!---------- Part One (1) Explanation Is Above ---------->


.menuskin a{
text-decoration:none;
color:black;
padding-left:10px;
padding-right:10px;
}

<!---------- Part Two (2) Of Style Sheet Is Above ---------->

<!---------- ~ Explanation For Part (2) Is Below ~ ---------->


#mouseoverstyle{
background-color:highlight;
}

<!---------- Part Three (3) Of Style Sheet Is Above ---------->

<!---------- Part Three (3) Explanation Is Below ---------->


#mouseoverstyle a{
color:white;
}
-->
</style>

<!---------- Part Four (4) Of Style Sheet Is Above ---------->

<!---------- Part Four (4) Explanation Is Below ---------->

The last thing we did was to also change the next part of the code from the color "white" (default) to the hex code of #1e90ff. (See Part Four (4) below:


T he next part we will cover (still in the <HEAD> section) are the links (URL's) and link names. We will also cover the opening each link in either the same window or a new browser window in this section.

var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

linkset[0]='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[0]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[0]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'

linkset[1]='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[1]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[1]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[1]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'

////No need to edit beyond here

I f you want to add another pop-up menu, like the above stated
"FOLLOW SYNTAX LAID OUT". In other words to add another set of links, the syntax would look something like the below.

var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

linkset[0]='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[0]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[0]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'

linkset[1]='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[1]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[1]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[1]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'

linkset[2]='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[2]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[2]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[2]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'

////No need to edit beyond here

Y ou can add or delete as many links in any linkset you need. Just remember to follow the numerical syntax.

N otice how we did it. We just added another set of links but pay particular attention the the number sequence. It Must follow in numerical order. 0,1,2, 3,4 etc.

N ow lets make the links open in a new browser window. In other words, when you select the link, your guest will stay on the page the menu is on and the link will open on a separate page, keeping the main page open in the background. Just add this attribute into the URL address
target="_blank"

linkset[0]='<div class="menuitems"><a href="URL Goes Here"target="_blank">Link Name Here</a></div>'
linkset[0]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'
linkset[0]+='<div class="menuitems"><a href="URL Goes Here">Link Name Here</a></div>'

I f you want the link to open in the same browser window, just do not add the attribute of target="_blank".

N ow for the last part of the code. This part goes in the <BODY> section of your document where you want the effect to be situated. This is the part that gives you the subject(s) for each link set.

<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
</div>

<a href="#" onMouseover="showmenu(event,linkset[0])" onMouseout="delayhidemenu()">Catagory Name Heres</a><br>
<a href="#" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">Catagory Name Here</a>

T o add another category, again, just follow the numerical syntax.

<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
</div>

<a href="#" onMouseover="showmenu(event,linkset[0])" onMouseout="delayhidemenu()">Category Name Here</a><br>
<a href="#" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">Category Name Here</a><br>
<a href="#" onMouseover="showmenu(event,linkset[2])" onMouseout="delayhidemenu()">Category Name Here</a>

N otice in the above section of code the # character. For all intensive purposes if you know your HTML coding, this would signify reverting back to your main or root URL by clicking on it. This is assuming that you have this menu effect on your main page. If you have this effect on any other page but your root URL (main page) you have two options available to you. You can either replace the # with the URL that this effect is on or disable the # URL. You can disable it by adding the below little sniplet of code into every # URL.
onClick="return false;"

<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
</div>

<a href="#"onClick="return false;" onMouseover="showmenu(event,linkset[0])" onMouseout="delayhidemenu()">Catagory Name Here</a><br>
<a href="#"onClick="return false;" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">Catagory Name Here</a>

B elow you will notice howto add the URL of the page this effect resides if it is not on your root or main URL.

<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
</div>

<a href="http://www.yourURL.com/pagename.html" onMouseover="showmenu(event,linkset[0])" onMouseout="delayhidemenu()">Catagory Name Here</a><br>
<a href="http://www.yourURL.com/pagename.html" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">Catagory Name Here</a>

R eason for this little modification is quite simple. People by nature are curious. They will click on links just to see where they go. If this menu is not on the main or root URL page, by clicking on it will sent your visitor to your main page. By making this reconfiguration, it makes the menu and your page just a little more professional.

I n the above section of code you will notice the <br> tag positioned in a few places. If you would view the Default Menu Effect ] you will see the categories are on top of each other. If you would remove these tags, they will be positioned side by side like in our modified example.

I f you would like to add this effect into your pages, just close this page and grab the link on the preceding page.

Copyright © Consigliere Ltd., All Rights Reserved. 2001-