iNET Interactive - Online Advertising Agency
          
   Home    Authors    About    Login    Contact Us
   Search:   
Advanced Search     
  Articles

  ASP (26)
  ASP.NET (19)
  C and C++ (4)
  CFML (2)
  CGI and Perl (16)
  Flash (2)
  Java (7)
  JavaScript (28)
  PHP (92)
  MySQL (13)
  MSSQL (3)
  HTML (35)
  SEO (9)
  Visual Basic (12)
  CSS (13)
  SSI (5)
  XML (12)
  C# (14)

  Developer News

September 7, 2008
Web Design Clinic - Art meets Webdesign
About
 
September 6, 2008
Browser safe colors - do we care?
About
 
September 6, 2008
Get a Daily CSS Tip
About
 
September 5, 2008
It's safe to use Google Chrome now
About
 
September 5, 2008
Add a comment
.net
 
September 5, 2008
The Partial Function Application in JavaScript
WebReference.com
 
Courtesy of moreover.com
 
Want to receive new articles via e-mail? Click here!
/Home /HTML /DHTML

DHTML Gliding Menu Navigation Bar 

  Views:    8913
  Votes:    2
by Eddie Traversa 4/30/04 Rating: 

Synopsis:

This little script was inspired by a flash navigation effect I saw some time ago. I wondered if I could do the same thing in DHTML and overall I am happy with the outcome.
Pages: firstback1 2 3 forwardlast
The Article

All we need to do now is call the assocaited functions from an event handler like so:

<div id="link1" style="position:absolute; top:44px; left:162px; z-index: 3;">
<a href="#" onmouseover="getPosition('link1');glideMenu('pointer')">
Link 1</a>
</div>

The only other thing to note is that if you want to change the script from moving horizontally to moving vertically, then change all references to offsetLeft to offsetTop and also change all references in the script from left to top and you have a vertically based version of this script.

Line 16:A new variable called el (short for element) is defined and is pointed to the document.getElementById(obj) ; statement. This allows us to create a JavaScript object of any element we identify with the obj argument by looking at its id value and then passing it to the function.

Download Gliding Navigation Bar Example

View Finished Example

Pages: firstback1 2 3 forwardlast

Similar/related articles:


 
  Sponsors