Hi.
I want to create a menu witch will slide submenus. The menu us based on ul li elements.
I have the following code:
[COLOR=Blue]
function menu(el, level)
{
var interval
this._parent = el;
this._ul = this._parent.getElementsByTagName(“ul”).item(0)
this._level = level;
this.stPos = this._ul.offsetHeight
this.topPos = 20 – this.stPos
this._parent.onmouseover=function() {
this.show()
}
this._parent.onmouseout=function() {
}
}
menu.prototype.show = function show()
{
var width = this._ul.offsetWidth
var height = this.
if (this.stPos!=0)
{
this.stPos=this.stPos-5
this.topPos=this.topPos+5
this._ul.style.clip=”rect(” + this.stPos + “px, ” + width + “px, ” + height + “px, ” + ” 0px)”
this._ul.style.top=this.topPos + ‘px’
this.interval = setTimeout(“[COLOR=Red]show()[/COLOR]”, 100)
}
}
var el = document.getElementById(“xx”);
var menu1 = new menu(el,1);
menu1.show();
[/COLOR]
I get this:
[COLOR=Red]Error:
name: ReferenceError
message: Statement on line 1: Reference to undefined variable: show
Backtrace:
Line 1 of unknown script
show();
I tried this.show() but same result.
Can anyone help me?
Thnaks!
Alin.