PDA

View Full Version : Customize All levels Navgational Menu for Arabic (RTL)



Izzeldin
08-19-2010, 05:32 AM
1) Script Title: All Levels Navigational Menu (v2.2)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/index.htm

3) Describe problem:
I am trying to use this menu in Arabic Language which goes from right to left
So far from the CSS I could align the menu and the links in the drop down lists to the right. You can see it here:
http://taxicabrichmondva.com/ddlevelsmenu/new_index.htm

Now I need help in JS codes to make the drop down list open to the left instead of the right, and positioning the arrow in the drop down list in the far left end (I made the new arrow: http://taxicabrichmondva.com/ddlevelsmenu/ddlevelsfiles/arrow-left.gif). To be working like this:
http://www.obout.com/em/ex_horizontal_rtl.aspx

Please help
Thank you

ddadmin
08-19-2010, 09:04 PM
To get the arrows inside the drop down menus to always appear on the left hand side, try finding the below line inside the .js file:


pointer.style.left=target.offsetWidth-imginfo[2]-2+"px"

and change that to:


pointer.style.left="5px"

Change "5" if necessary. You should also indent the text inside the drop down menus to ensure the arrow and text do not overlap.

To get the sub menus to always drop to the left, try commenting out the below two lines inside this block of code:


//if (submenurightedge-scrollX>ddlevelsmenu.docwidth){
menuleft+= -this._dimensions.submenuw + (this._istoplevel && dir=="topbar" ? this._dimensions.w : -this._dimensions.w)
//}

Izzeldin
08-21-2010, 01:22 AM
Thank you so much
It works like magic
http://taxicabrichmondva.com/ddlevelsmenu/new_index.htm
And for those who might need to know:
"5px" works for me, I didn't need to change it.
I also put the arrow-left.gif in "line 16" instead of arrow-right
rightarrow: ["ddlevelsfiles/arrow-left.gif", 12,12]

Thank you ddadmin