PDA

View Full Version : How to change the path of the images in js.file[Smooth Navigational Menu (v1.31)]



earthsolar
08-26-2009, 04:13 PM
1) Script Title: Smooth Navigational Menu (v1.31)

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

3) Describe problem:
I have installed the menu and everything is fine but only the arrow images cannot be shown. I use the Navigational Menu in a phpbb forum. And I only use the horizontal style , not the vertical style.

Because I have to place the images to other folder , not as instructed to put them in the same directory as the page itself.

Here is the path of the jquery.min.js :


root/jquery/jquery.min.js

Here is the path of the ddsmoothmenu.js :


root/styles/rainbow/template/ddsmoothmenu.js

Here are the path of the ddsmoothmenu.css, arrow.gif, down.gif :


root/styles/rainbow pearl/theme/navigational_menu/ddsmoothmenu.css
root/styles/rainbow pearl/theme/navigational_menu/arrow.gif
root/styles/rainbow pearl/theme/navigational_menu/down.gif


I have changed the code in the page as follow :
(part of the code)

<link rel="stylesheet" type="text/css" href="{T_THEME_PATH}/netvigation_menu/ddsmoothmenu.css" />
<script type="text/javascript" src="./jquery/jquery.min.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/ddsmoothmenu.js">

My question is in the ddsmoothmemu.js , how to edit the path of the images:

//Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs):
arrowimages: {down:['downarrowclass', 'down.gif', 23], right:['rightarrowclass', 'right.gif']},


Thank you !

ddadmin
08-27-2009, 02:50 AM
The easiest way is actually just to change the image paths so they are absolute URLs, ie:


arrowimages: {down:['downarrowclass', 'http://www.mysite.com/images/down.gif', 23], right:['rightarrowclass', 'http://www.mysite.com/images/right.gif']},

earthsolar
08-27-2009, 12:29 PM
Thank you very much for your reply, the arrows now show up.

But one question is how to align the menu headings to center instead of from the left side.

Thank you !

ddadmin
08-27-2009, 10:20 PM
Hi earthsolar:
The alignment issue has been asked a few times on the forums. Basically the menu's use of CSS float:left makes it difficult. this is a CSS issue though- if you're able to rework the CSS so to not use CSS float but still retain the look you like, then that will work.