Use Jquery to amend a url - replacing a slash ('/') with a hash ('#')

More of a jQuery issue, than a C5 one - but...

I'm making a section of a site has a long scroll page. It is using a page list to show multiple pieces of content on a single page. I need to amend the URLs being used in one part of the navigation to do 2 things:
- Remove final trailing slash
- Replace second to last slash with a hash - i.e: '#'

What I have:

What I want:

Can anyone suggest a tidy jQuery function to do this? I'm sure it's straightforward, but am currently hitting a brick wall.


View Replies: