This was tricky to get looking nice. Here is a drop in replacement for the demo's style:
Code:
<style type="text/css">
#popitmenu{
position: absolute;
background-color: white;
border:1px solid black;
font: normal 12px Verdana;
line-height: 18px;
z-index: 100;
visibility: hidden;
}
#popitmenu td{
font: normal 12px Verdana;
line-height: 18px;
text-align:center;
border-bottom:1px solid black;
}
#popitmenu a{
text-decoration: none;
padding:2px 6px;
color: black;
}
#sep {
width:1px;
background:black;
padding:0;
border:0
}
#popitmenu td.bot{
border-bottom:0;
}
#popitmenu table {
width:100%;
border-collapse:collapse;
cell-spacing:0
}
#popitmenu a:hover{ /*hover background color*/
background-color: #CCFF9D;
}
</style>
and a replacement for the linksets:
Code:
linkset[0]='<table><tr><td><a href="http://dynamicdrive.com">Dynamic Drive</a></td><td id="sep"></td><td><a href="http://javascriptkit.com">JavaScript Kit</a></td></tr>'
linkset[0]+='<tr><td><a href="http://www.javascriptkit.com">JavaScript Kit</a></td><td id="sep"></td><td><a href="http://www.codingforums.com">Coding Forums</a>'
linkset[0]+='<tr><td class="bot"><a href="http://www.cssdrive.com">CSS Drive</a></td><td id="sep" class="bot"></td><td class="bot"><a href="http://freewarejava.com">Freewarejava</a></td></tr></table>'
linkset[1]='<a href="http://msnbc.com">MSNBC</a>'
linkset[1]+='<br><a href="http://cnn.com">CNN</a>'
linkset[1]+='<br><a href="http://news.bbc.co.uk">BBC News</a>'
linkset[1]+='<br><a href="http://www.washingtonpost.com">Washington Post</a>'
and finally the markup for activating the pop ups:
HTML Code:
<a href="#" onMouseover="showmenu(event,linkset[0],'250px')" onMouseout="delayhidemenu()">Webmaster Links</a><br>
<a href="#" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">News sites</a><br>
Only the first linkset, linkset[0], is transformed to have to columns of links but, linkset[1] has some changes to get it to render with the new style. Pay close attention to minor differences in each line of linkset[0]. The first and last linkset[0] are unique, the middle one is representative of how all but the first and last should look like.
Bookmarks