93
rated 0 times
[
95]
[
2]
/ answers: 1 / hits: 20946
/ 14 Years ago, thu, october 7, 2010, 12:00:00
I have a nav, each link in the nav just appends a hashtag on the existing URL when clicked, for live filtering, etc. with the use of jQuery.
I want to append the SAME current hashtag to a series of links within a div further down the page.
For example, I've clicked work and my URL now looks like:
http://www.domain.com/page.html#work
I have a series of links in the page:
<div id=links>
<ul>
<li><a href=http://www.domain.com/link1>Link1</a></li>
<li><a href=http://www.domain.com/link2>Link2</a></li>
<li><a href=http://www.domain.com/link3>Link3</a></li>
<li><a href=http://www.domain.com/link4>Link4</a></li>
</ul>
</div>
These links within the div#links need to be updated on the fly to append #work on all the URL's so that when clicked the hashtag is appended.
Is this possible? Does this make sense?
More From » jquery