Grow your CSS skills. Land your dream job.

Remove # from end of URL

  • # March 8, 2012 at 12:21 am

    Howdy!

    Curious if anyone can suggest a method for removing the hashtag at the end of a URL. In my case the hashtag is visible after I click a link (activating a jQuery .slideToggle) with the following code:

    Link

    The end result is this:

    website.com/#

    (FYI the hashtag never leaves the url)

    # March 8, 2012 at 12:47 am

    You could always change it to a < span> and just give it some CSS to make the pointer (hand) show up.

    # March 8, 2012 at 1:25 am

    changing it to a span means that users can’t tab to it

    Link

    If you are already using a JavaScript eventHandler for this anchor add the return false to the end of the function instead
    Or if you are using jQuery use e.preventDefault();

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".