Quick Search for:  in language:    
script,slipping,sliding,link,menu,need,someth
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Java/ Javascript Stats

 Code: 220,465. lines
 Jobs: 92. postings

 How to support the site

 
Sponsored by:

 
You are in:
 
Login





Latest Code Ticker for Java/ Javascript.
Click here to see a screenshot of this code!vok - The vocabulary trainer
By Thorsten Stärk on 1/7

(Screen Shot)

Java, Calculator
By Rockwell on 1/4


Eatable Interface
By Rockwell on 1/4


Superclass Person
By Rockwell on 1/4


Draws Cube Function
By Rockwell on 1/4


Rectangle Class
By Rockwell on 1/4


Find Number of Upper and Lower Case Letters in a Command Line Argument String
By Rockwell on 1/4


anagrams
By Rockwell on 1/4


Text Reader with Tokenizer
By Rockwell on 1/4


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites



 
 
   

The Slip and Slide Menu

Print
Email
 
VB icon
Submitted on: 3/15/2001 12:48:40 AM
By: Sam Moses The Old Account  
Level: Advanced
User Rating: By 4 Users
Compatibility:JavaScript

Users have accessed this code 19090 times.
 
(About the author)
 
     This script is a slipping and sliding link menu. If you need something that is going to wow your users and make your web site nav look great, try this.

 

HTML:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!

//**************************************
//     
//HTML for :The Slip and Slide Menu
//**************************************
//     
<HTML>
<BODY><P>
<SCRIPT LANGUAGE=JAVASCRIPT></SCRIPT>
</P>
<H1 align="center"><FONT size="7">this IS A TEST PAGE</FONT></H1>
</BODY></HTML>
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

//**************************************
//     
// Name: The Slip and Slide Menu
// Description:This script is a slipping
//     and sliding link menu. If you need somet
//     hing that is going to wow your users and
//     make your web site nav look great, try t
//     his.
// By: Sam Moses The OldAccount
//
// Assumes:I was bored one night and I w
//     as looking to experiment with some new i
//     deas I was having. Somewhere in my trave
//     ls I had made it to Microsoft’s we
//     b site. <p>I took it apart and pla
//     yed with their .js files for the pull do
//     wn nav, and loved it. I had also been to
//     geocities (this mind you was before yaho
//     o bought them out,) and I had an idea.&l;
//     t;p> I loved the way the geocities wa
//     termark always stayed at the bottom of t
//     he pages, and I loved what Microsoft had
//     done with layers, and I was intent on cr
//     eating some kind of nav scheme that comb
//     ined both cool features. <p>The bi
//     ggest problem was that it didn't work in
//     Netscape. I toyed with it a bit, and a y
//     ear and a half and eight versions of the
//     code later, I think it's ready for relea
//     se. <p>It still doesn't work with 
//     older versions of NS but then again, wha
//     t does? <p>What it does do is crea
//     te a nav scheme like no other. It can be
//     configured to look and feel like the res
//     t of your web site if you know you layer
//     s, and will run with no messy configurat
//     ion.<p>Have Fun!
//
//This code is copyrighted and has// limited warranties.Please see http://
//     www.Planet-Source-Code.com/vb/scripts/Sh
//     owCode.asp?txtCodeId=2138&lngWId;=2//for details.//**************************************
//     

<!--
/*
Copyright © THE GREAT HUMBLE AND EVER SERIOUS SAM MOSES
Version: 8 (N6.01 Compatibility)
*/
// Default settings. They are flexable a
//     nd can be modified.
YOffset=20; // no quotes!!
staticYOffset=20; // no quotes!!
slideSpeed=20 // no quotes!!
waitTime=0; // no quotes!! this sets the time the nav stays out for after the mouse goes off it.
hdrFontFamily="Verdana";
linkFontFamily="Verdana";
linkFontSize="1";
navIsStatic="yes";
navWidth=110; // Must be a multiple of 10! no quotes!!
barBGColor="#ccccc";
barFontFamily="Verdana";
barVAlign="top";
barWidth=10; // no quotes!!
NS6 = (document.getElementById&&!document.all)
IE = (document.all)
NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")
moving=setTimeout('null',1)
    function moveOut() {
        if ((NS6 && parseInt(epnav.left)<0)||(IE && epnav.style.pixelLeft<0)||(NS && document.epnav.left<0)) {
        clearTimeout(moving);moving = setTimeout('moveOut()', slideSpeed)
        if (NS6) {epnav.left = parseInt(epnav.left)+10+"px";}
        if (IE) {epnav.style.pixelLeft += 10;}
        if (NS) {document.epnav.left += 10;}}
        else {clearTimeout(moving);moving=setTimeout('null',1)}};
            function moveBack() {
            clearTimeout(moving);moving = setTimeout('moveBack1()', waitTime)}
                function moveBack1() {
                    if ((NS6 && parseInt(epnav.left)>(-navWidth))||(IE && epnav.style.pixelLeft>(-navWidth))||(NS && document.epnav.left>(-navWidth))) {
                    clearTimeout(moving);moving = setTimeout('moveBack1()', slideSpeed);
                    if (NS6) {epnav.left = parseInt(epnav.left)-10+"px";}
                    if (IE) {epnav.style.pixelLeft -= 10;}
                    if (NS) {document.epnav.left -= 10;}}
                    else {clearTimeout(moving);moving=setTimeout('null',1)}};
                    lastY = 0;
                        function makeStatic() {
                        if (NS6) {winY = window.pageYOffset;}
                        if (IE) {winY = document.body.scrollTop;var NM=document.all('epnav').style}
                        if (NS) {winY = window.pageYOffset;var NM=document.epnav}
                            if (NS6||IE||NS) {
                                if (winY!=lastY&&winY;>YOffset-staticYOffset) {
                                smooth = .2 * (winY - lastY - YOffset + staticYOffset);}
                                    else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) {
                                    smooth = .2 * (winY - lastY);}
                                    else {smooth=0}
                                    if(smooth > 0) smooth = Math.ceil(smooth);
                                    else smooth = Math.floor(smooth);
                                    if (NS6) epnav.top=parseInt(epnav.top)+smooth+"px"
                                    if (IE) NM.pixelTop+=smooth;
                                    if (NS) NM.top+=smooth;
                                    lastY = lastY+smooth;
                                    setTimeout('makeStatic()', 1)}}
                                        function initSlide() {
                                            if (NS6){
                                            epnav=document.getElementById("epnav").style
                                            epnav.visibility="visible";
                                            epnav.left = -navWidth;}
                                                else if (IE) {
                                                epnav.style.visibility = "visible"
                                                epnav.style.pixelLeft = -navWidth;}
                                                    else if (NS) {
                                                    document.epnav.left = -navWidth;
                                                    document.epnav.visibility = "show"}
                                                    if (navIsStatic=="yes") makeStatic();}
                                                        function startNav(navHeader, barText) {
                                                        if (IE||NS6) {document.write('<DIV ID="epnav" style="visibility:hidden;Position : Absolute ;Left : 0px ;Top : '+YOffset+' ;Z-Index : 20;width:1px" onmouseover="moveOut()" onmouseout="moveBack()">')}
                                                        if (NS) {document.write('<LAYER visibility="hide" top="'+YOffset+'" name="epnav" bgcolor="'+navBGColor+'" left="0" onmouseover="moveOut()" onmouseout="moveBack()">')}
                                                        if (NS6){document.write('<TABLE border="0" cellpadding="0" cellspacing="0" width="'+(navWidth+barWidth+2)+'" bgcolor="'+navBGColor+'"><TR><TD>')}
                                                        tempBar=""
                                                            for (i=0;i<BarText.length;i++) {
                                                            tempBar+=barText.substring(i, i+1)+"<BR>"}
                                                            document.write('<TABLE border="0" cellpadding="0" cellspacing="1" width="'+(navWidth+barWidth+2)+'" bgcolor="'+navBGColor+'"><TR><TD bgcolor="'+hdrBGColor+'" WIDTH="'+(navWidth-1)+'" HEIGHT="'+hdrHeight+'" ALIGN="'+hdrAlign+'" VALIGN="'+hdrVAlign+'"> <FONT face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><B>'+navHeader+'</B></FONT></TD><TD align="center" rowspan="100" width="'+barWidth+'" bgcolor="'+barBGColor+'" valign="'+barVAlign+'"><P align="center"><FONT face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="'+barFontColor+'"><B>'+tempBar+'</B></FONT></P></TD></TR>')}
                                                                function addItem(text, link, target) {
                                                                if (!target) {target=linkTarget}
                                                                document.write('<TR><TD BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="'+(navWidth-1)+'"><ILAYER><LAYER onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%" ALIGN="'+linkAlign+'"><DIV ALIGN="'+linkAlign+'"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'"> <A HREF="'+link+'" target="'+target+'" CLASS="epnavItems">'+text+'</DIV></LAYER></ILAYER></TD></TR>')}
                                                                    function addHdr(text) {
                                                                    document.write('<TR><TD bgcolor="'+hdrBGColor+'" HEIGHT="'+hdrHeight+'" ALIGN="'+hdrAlign+'" VALIGN="'+hdrVAlign+'" WIDTH="'+(navWidth-1)+'"> <FONT face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><B>'+text+'</B></FONT></TD></TR>')}
                                                                        function endNav() {
                                                                        document.write('<TR><TD bgcolor="'+hdrBGColor+'"><FONT size="0" face="Arial"> </FONT></TD></TR></TABLE>')
                                                                        if (NS6){document.write('</TD></TR></TABLE>')}
                                                                        if (IE||NS6) {document.write('</DIV>')}
                                                                        if (NS) {document.write('</LAYER>')}
                                                                        if (NS6||IE||NS) setTimeout('initSlide();', 100)}
                                                                        //-->
                                                                        <!--
                                                                        /*
                                                                        Configure nav styles below
                                                                        NOTE: To edit the link colors, go to the STYLE tags and edit the epnavItems colors
                                                                        */
                                                                        YOffset=20; // no quotes!!
                                                                        staticYOffset=20; // no quotes!!
                                                                        slideSpeed=20 // no quotes!!
                                                                        waitTime=20; // no quotes!! this sets the time the nav stays out for after the mouse goes
                                                                        navBGColor="#cccccc";
                                                                        navIsStatic="yes";
                                                                        navWidth=100; // Must be a multiple of 10! no quotes!!
                                                                        hdrFontFamily="verdana";
                                                                        hdrFontSize="1";
                                                                        hdrFontColor="BLUE";
                                                                        hdrBGColor="#ffffff";
                                                                        hdrAlign="left";
                                                                        hdrVAlign="center";
                                                                        hdrHeight="20";
                                                                        linkFontFamily="Verdana";
                                                                        linkFontSize="1";
                                                                        linkBGColor="#E5E5E5";
                                                                        linkOverBGColor="#CCCCCC";
                                                                        linkTarget="main";
                                                                        linkAlign="Left";
                                                                        barBGColor="#ffffff";
                                                                        barFontFamily="Verdana";
                                                                        barFontSize="1";
                                                                        barFontColor="#000000";
                                                                        barVAlign="left";
                                                                        barWidth=10; // no quotes!!
                                                                        startNav("category", "LINKS")
                                                                        addItem('sams page1', '3?news', '');
                                                                        addItem('sam2', '1.asp', '');
                                                                        addItem('sam3', '2.asp', '');
                                                                        addItem('sam4', '3.asp', '');
                                                                        addItem('sam5', '4.asp', '');
                                                                        addHdr('category2');
                                                                        addItem('sam6', '5.asp', '');
                                                                        addItem('sam7', '6.asp', '');
                                                                        addItem('sam8', '7.asp', '');
                                                                        addItem('sam9', '8.asp', '');
                                                                        addItem('sam10', '9.asp', '');
                                                                        addItem('sam11', '10.asp', 'target=moulder');
                                                                        addItem('sam12', '11.asp', 'target=skully');
                                                                        addHdr('category3');
                                                                        addItem('sam1', '12.asp', '');
                                                                        addItem('sam2', '13.asp', '');
                                                                        addItem('sam3', '14.asp', '');
                                                                        addItem('sam4', '15.asp', '');
                                                                        addItem('sam5', '17.asp', '');
                                                                        addItem('sam6', '18.asp', '');
                                                                        endNav()
                                                                        //-->


Other 6 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
3/16/2001 4:42:42 AM:jelias@wester-deboer.nl
If you add another category 
(category4), you cannot access that 
menu. How can this be solved? This 
program limits you to a certain number 
of items!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/16/2001 3:32:28 PM:Sam Moses
This script is not ideal for everyone. 
The problem mentioned above can be 
tricky for sites with a lot of content. 
I am working on a version with second 
level sliding menues, but that will 
take me some time. It should be ready 
sooner or later.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/6/2003 4:18:38 AM:
Not swell, problem line 103 character 7 
in reference to... "Bar Text 
undefined"
However, I'll just find 
something a bit more versatile (albeit 
grotesque if I must) as long as it 
works.
I'm not familiar with JS, 
Hell I even have problems using a 
bloody external .js file... However 
it's usually the easy stuff that evades 
me.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Java/ Javascript Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.