chrbar
01-07-2008, 02:56 AM
Hello,
I would like to use the great script "Drop down/Overlapping Content".
http://www.dynamicdrive.com/dynamicindex5/overlapcontent.htm
But I would like the drop down appears at the right of my menu title (text or image)... instead of the top or bottom positions.
The current positions of the drop down are "left-bottom", "right-bottom", "left-top", and "right-top"... is it possible to have "right" (and "left") with the top corner of the drop down at the same level that the menu title (in my case, I would like to use an image as menu title and I would like the top left corner of the drop down at the same level that the top right corner of the image)... like with the AnyLink Vertical Menu (http://www.dynamicdrive.com/dynamicindex1/anylinkvertical.htm).
I've tried some changes, but I don't know if it's the best way...
var horizontaloffset=(subobj.dropposition[0]=="left")? -(subobj.offsetWidth-anchorobj.offsetWidth) : 110 //calculate user added horizontal offset
var verticaloffset=(subobj.dropposition[1]=="top")? -(subobj.offsetHeight-anchorobj.offsetHeight) : -20 //calculate user added vertical offset
instead of the originale code
var horizontaloffset=(subobj.dropposition[0]=="left")? -(subobj.offsetWidth-anchorobj.offsetWidth) : 0 //calculate user added horizontal offset
var verticaloffset=(subobj.dropposition[1]=="top")? -subobj.offsetHeight : anchorobj.offsetHeight //calculate user added vertical offset
Could you help me :)
Thanks a lot,
Chris
I would like to use the great script "Drop down/Overlapping Content".
http://www.dynamicdrive.com/dynamicindex5/overlapcontent.htm
But I would like the drop down appears at the right of my menu title (text or image)... instead of the top or bottom positions.
The current positions of the drop down are "left-bottom", "right-bottom", "left-top", and "right-top"... is it possible to have "right" (and "left") with the top corner of the drop down at the same level that the menu title (in my case, I would like to use an image as menu title and I would like the top left corner of the drop down at the same level that the top right corner of the image)... like with the AnyLink Vertical Menu (http://www.dynamicdrive.com/dynamicindex1/anylinkvertical.htm).
I've tried some changes, but I don't know if it's the best way...
var horizontaloffset=(subobj.dropposition[0]=="left")? -(subobj.offsetWidth-anchorobj.offsetWidth) : 110 //calculate user added horizontal offset
var verticaloffset=(subobj.dropposition[1]=="top")? -(subobj.offsetHeight-anchorobj.offsetHeight) : -20 //calculate user added vertical offset
instead of the originale code
var horizontaloffset=(subobj.dropposition[0]=="left")? -(subobj.offsetWidth-anchorobj.offsetWidth) : 0 //calculate user added horizontal offset
var verticaloffset=(subobj.dropposition[1]=="top")? -subobj.offsetHeight : anchorobj.offsetHeight //calculate user added vertical offset
Could you help me :)
Thanks a lot,
Chris