Hi all,
I've been struggling with different ways to solve a problem for about a week, and as my attempts have so far been fruitless, I figured I would turn to DaniWeb for some help.
I have an unordered list <ul class="navigation"> where each list item contains some links.
Example:
<ul class="navigation">
<li><a href="index.php?view=cover">COVER</a></li>
<li><a href="index.php?view=contents">CONTENTS</a></li>
<li><a href="index.php?view=cogito-ergo-hack">AROUND TOWN</a>
<ul class="sub">
<li><a href="index.php?view=cogito-ergo-hack">Cogito Ergo Hack</a></li><br />
<li><a href="index.php?view=now-boarding">Now Boarding</a></li><br />
<li><a href="index.php?view=higher-calling">Higher Calling</a></li><br />
</ul>
</li>
etc...
Basically, I'm trying to find a javscript function that finds the string "index.php?view=" in those links and replaces it with a "#" (hash symbol) when the page loads/document is ready.
I did the Google searches and every method I've tried seems to fail at doing anything- The scripts that I've tried have mostly been modified from web tutorials and, like I said, they haven't worked in the slightest. But if it would be helpful, I can post some of what I've tried if anyone would like.
SUMMARY:
I'm trying to change this:
<ul class="navigation">
<li><a href="index.php?view=cover">COVER</a></li>
<li><a href="index.php?view=contents">CONTENTS</a></li>
<li><a href="index.php?view=cogito-ergo-hack">AROUND TOWN</a>
<ul class="sub">
<li><a href="index.php?view=cogito-ergo-hack">Cogito Ergo Hack</a></li><br />
<li><a href="index.php?view=now-boarding">Now Boarding</a></li><br />
<li><a href="index.php?view=higher-calling">Higher Calling</a></li><br />
</ul>
</li>
etc...
to this:
<ul class="navigation">
<li><a href="#cover">COVER</a></li>
<li><a href="#contents">CONTENTS</a></li>
<li><a href="#cogito-ergo-hack">AROUND TOWN</a>
<ul class="sub">
<li><a href="#cogito-ergo-hack">Cogito Ergo Hack</a></li><br />
<li><a href="#now-boarding">Now Boarding</a></li><br />
<li><a href="#higher-calling">Higher Calling</a></li><br />
</ul>
</li>
etc...
Extra Note: I'm using jQuery localscroll plugin, which is why I need these links changed to hashes.
Thanks in advance,
Ty