Reese
Junior Member
I've said one great thing!
Posts: 53
Reese said 0 great things
|
Post by Reese on Jun 4, 2010 11:19:02 GMT -8
Can you make me a code that as a new thing to the menu but also when you put your mouse on it, it shows more links? I would like it to say blogs. Thanks!
|
|
|
Post by Wormopolis on Jun 7, 2010 20:32:01 GMT -8
so a menubar button that does a pagedrop style div with links in it?
|
|
Reese
Junior Member
I've said one great thing!
Posts: 53
Reese said 0 great things
|
Post by Reese on Jun 26, 2010 6:53:58 GMT -8
Yes please
|
|
|
Post by Wormopolis on Jun 27, 2010 3:09:53 GMT -8
|
|
|
Post by Wormopolis on Jul 2, 2010 21:47:01 GMT -8
So.. yes? no?
|
|
Reese
Junior Member
I've said one great thing!
Posts: 53
Reese said 0 great things
|
Post by Reese on Aug 12, 2010 19:20:18 GMT -8
Yes sorry been gone 4 a while
|
|
|
Post by Wormopolis on Aug 12, 2010 21:16:04 GMT -8
did you get the code from the headers or do you need me to post it?
|
|
j10cool10
Not New Member
Posts: 1
j10cool10 said 0 great things
|
Post by j10cool10 on Oct 26, 2010 4:13:17 GMT -8
Could you post this code please?
|
|
|
Post by Wormopolis on Oct 26, 2010 19:32:48 GMT -8
Yes I can.. It currently finally working, but I was trying to make it look a little better with tables instead of just spans inside the divs. lemme finish that off first.
|
|
|
Post by Wormopolis on Oct 27, 2010 19:33:29 GMT -8
code as it stands:
<script type="text/javascript"> <!-- // New menu item with dropdown // v2.01 // by Wormopolis - wormocodes.proboards.com // do not repost - keep header intact // pagedrop functions modified from PB code
var dropTitle="Subjects"; var dropSubs=[ ["English",[["Title1","URL1"],["Title2","URL2"],["Title3","URL3"]] ], ["Math",[["Title1","URL1"],["Title2","URL2"],["Title3","URL3"],["Title4","URL4"]] ], ["History",[["Title1","URL1"],["Title2","URL2"],["Title3","URL3"]] ], ["Science",[["Title1","URL1"],["Title2","URL2"]] ] //no comma last line ];
var menuPosition=2; //set to -1 if you want it at the end
var menuButton="http://i197.photobucket.com/albums/aa250/WORMOPOLIS/3D_Background_062.jpg";
// NO NEED TO EDIT BELOW
if (!location.href.match(/newmenudrop/)) { var drop1=document.createElement('div'), drop2=document.createElement('div'); drop1.className='windowbg'; drop1.id='menudropmain'; drop2.className='windowbg2'; drop2.id='menudropsubs'; drop1.style.display=drop2.style.display='none'; document.body.appendChild(drop1); document.body.appendChild(drop2); drop2.onmouseout=function() {window.clearTimeout(tm_usr); NMunload_tlist_pageSpan2();};
var tm_usr, tm_usr2=false; var NMcurleft = NMcurtop = 0;
function NMnewplace(menucont) { var mn=(menucont==0 ? drop1 : drop2); mn.style.cssText = "position: absolute; top: "+ NMcurtop +"px; left: "+NMcurleft+"px;"; mn.style.display=''; }
function NMload_tlist_pageSpan2(obj, objoffset, menuchoice) { window.clearTimeout(tm_usr2); window.clearTimeout(tm_usr); var vic= (objoffset==0 ? document.getElementById('menudropmain') : document.getElementById('menudropsubs') ); keepH=parseInt(objoffset==0 ? obj.offsetHeight : obj.parentNode.parentNode.parentNode.offsetHeight); keepW=parseInt(objoffset==0 ? obj.offsetWidth : obj.parentNode.parentNode.parentNode.offsetWidth); if (obj.parentNode.parentNode.parentNode.parentNode.style.left) { NMcurleft=parseInt(obj.parentNode.parentNode.parentNode.parentNode.style.left); NMcurtop=parseInt(obj.parentNode.parentNode.parentNode.parentNode.style.top); } else { if (obj.offsetParent) { NMcurleft = obj.offsetLeft; NMcurtop = obj.offsetTop; while (obj = obj.offsetParent) { NMcurleft += obj.offsetLeft; NMcurtop += obj.offsetTop; } } } NMcurtop+=(objoffset == 0 ? keepH : 0); NMcurleft+=(objoffset == 1 ? keepW : 0);
tmpHTML="<table class='bordercolor' cellspacing='1'>"; if (menuchoice==undefined) { for (bl=0; bl<dropSubs.length; bl++) tmpHTML+="<tr><td class='windowbg' onmouseover='NMload_tlist_pageSpan2(this, 1,"+bl+");'>"+dropSubs[bl][0]+"</td></tr>"; } else { for (bl=0; bl<dropSubs[menuchoice][1].length; bl++) tmpHTML+="<tr><td class='windowbg2'><a href='"+dropSubs[menuchoice][1][bl][1]+"'>"+dropSubs[menuchoice][1][bl][0]+"</a></td></tr>"; } tmpHTML+="</table>"; vic.innerHTML=tmpHTML; vic.onmouseover=function() {window.clearTimeout(tm_usr2);};
if (vic.keepit && vic.keepit!=obj) vic.style.display='none'; vic.keepit=obj;
tm_usr=window.setTimeout("NMnewplace("+objoffset+")",200); }
function NMunload_tlist_pageSpan2() { tm_usr2=window.setTimeout("drop1.style.display=drop2.style.display='none';", 2000); }
for (lnks=document.getElementsByTagName('a'), i=0; i<lnks.length; i++) {
if (lnks[i].href.match(/action=(members|search)$/)) { btnbar=lnks[i].parentNode; btnlist=btnbar.getElementsByTagName('a'); btnSpot=btnlist[menuPosition-1]; nwbtn=document.createElement('img'); nwbtn.src=menuButton; nwbtn.onmouseover=function() {NMunload_tlist_pageSpan2(); NMload_tlist_pageSpan2(this, 0);} nwbtn.onmouseout=function() {window.clearTimeout(tm_usr); NMunload_tlist_pageSpan2();}; btnbar.insertBefore(document.createTextNode(' '), btnSpot); btnbar.insertBefore(nwbtn, btnSpot); break; } }
} // --> </script>
|
|