PDA

View Full Version : jQuery Multi Level CSS Menu #2 - no arrows when pages located in subfolder



Zhuchina
01-20-2010, 06:28 PM
1) Script Title: jQuery Multi Level CSS Menu #2

2) Script URL (on DD): http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/

3) Describe problem: Hi! Thanks for superb menu and script! My question - I have scripts located in mysite/scripts folder, images in mysite/images folder and css in mysite/CSS folder. Relevant paths in css and js files changed accordingly. On pages located in mysite/ folder everything works OK, but on pages in mysite/subfolder/ folders menu itself works but no down/righ arrows visible. Would appreciate your assistance.:confused:

jscheuer1
01-20-2010, 07:31 PM
Inside the jqueryslidemenu.js file, near the top is (emphasis added):


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

These filenames and paths, if relative, will be relative to the page that is using the script, not to the script. If you have, as you say, two or more pages on different paths that are using the script, you must use the absolute path to these images (the full URL), like:


http://www.mydomain.com/images/down.gif

Use the exact path in effect on your server.

An alternative is to use the network path. The equivalent network path for the above absolute path would be:


/images/down.gif

Note: No leading dots, these make the path relative. In a network path the first slash (/) represents the root of the domain.

Zhuchina
01-20-2010, 09:23 PM
Thanks John, the absolute path fixed the problem (but the network path didn't).

jscheuer1
01-21-2010, 01:25 AM
Glad it worked out for you. When changing things in your files though, there is always the possibility that things may be cached, or that a typo may creep in. Network paths work. But, as long as you are happy with the result, who am I to complain.