0

I'm making a series of webpages, and need to control top level navigation through an external JS file. I can't even think of how to begin to code this. Does each page need to be assigned an array index? Then how do I hide the link to the current page?

2
Contributors
2
Replies
16
Views
1 Year
Discussion Span
Last Post by TObannion
0

What do you mean? Are you going to change the navigation menu after the page is loaded?

Or do you just want to know what page was loaded to do something on the contents?

Or do you want to have an tree-like structure that dinamically changes the navigation upon user interaction?

To hide a link to a page is simple, let's hide every link to test.php with jQuery:

$(function() {
    $('a[href="teste.php"]').hide();
});
0

I forgot to mention, for this part I am not "allowed" to use any libraries. I actually just bit the bullet and made a parallel array for the navigation. Not exactly what was asked of me, but it works. I would suppose I need one array to hold the file addresses and one to keep track of what page is currently displayed. When I tried to do it that way the only way I could get it to work was with absolute file paths, which only help if you're accessing it on my machine. It's turned in now but I would still like to know how it can be done.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.