|
The good news is, this is likely a very easy question for you! I am a "rank beginner" at web design, but am working to create a web site for our small school on the Apache Reservation. In working on a template page I utilized a javascript for "Float Menu" from http://www.javascript-fx.com/.
The problem I am having is that I do not want the menu to start its "floating" at the top of the web page; I have a drop down menu that ends at approximately 175 pixels from the top, I want the floating menu to start after this.
How can I make the menu begin its "floating" at about 175 pixels from the top of the window?
The script is:
/*******************************************************************
*
* File : JSFX_FloatingLayer.js © JavaScript-FX.com
* Created : 2001/03/16
* Author : Roy Whittle www.Roy.Whittle.com
* Purpose : To make and positional div float to
* one plave on the page and stay there.
* History
* Date Version Description
* 2001-03-17 2.0 Converted for javascript-fx
***********************************************************************/
JSFX.FloatingLayer = function(theDiv, x, y)
{
//Call the superclass constructor
this.superC = JSFX.Layer;
this.superC(JSFX.findLayer(theDiv), x, y);
this.baseX = x;
this.baseY = y;
this.x = x;
this.y = y;
this.moveTo(x,y);
this.show();
}
JSFX.FloatingLayer.prototype = new JSFX.Layer;
JSFX.FloatingLayer.prototype.animate = function()
{
var targetX;
var targetY;
if(this.baseX > 0)
targetX = JSFX.Browser.getMinX() + this.baseX;
else
targetX = JSFX.Browser.getMaxX() + this.baseX;
if(this.baseY > 0)
targetY = JSFX.Browser.getMinY() + this.baseY;
else
targetY = JSFX.Browser.getMaxY() + this.baseY;
var dx = (targetX - this.x)/8;
var dy = (targetY - this.y)/8;
this.x += dx;
this.y += dy;
this.moveTo(this.x, this.y);
}
JSFX.MakeFloatingLayer = function(theDiv, x, y)
{
JSFX
.MakeFloatingLayer.floaters[JSFX.MakeFloatingLayer.floaters.length] =
new JSFX.FloatingLayer(theDiv, x, y);
}
JSFX.MakeFloatingLayer.floaters = new Array();
JSFX.MakeFloatingLayer.animate = function()
{
var i;
for(i=0 ; i<JSFX.MakeFloatingLayer.floaters.length ; i++)
JSFX.MakeFloatingLayer.floaters.animate();
}
setInterval("JSFX.MakeFloatingLayer.animate()", 30);
I am using DreamWeaver 3 for my first attempts at web design.
Thank you in advance for any support you might lend.
|
|
|
I can recommand some info about floating Menu for you, you can search it in Google, and you will find a lot of information, you can choose the best one!
_____________________ flash banner|flash menu
|
|
|
Floating menu, you can easily implement it using AJAX tool, and also may take help to your senior or from "W3" school, i'm sure that might help you to sort out your problem.
_______________________________________________ Nanacast
|
|
|
For your task you can try using floating div Javascript example in confined mode (which will allow you to specify exact place where to have your menu being moved).
|
|
|
|
|
|
|
|
|
|
|
|