Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 479937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:50:33+00:00 2026-05-13T00:50:33+00:00

I am trying to get a handle on using URL hashes in jQuery to

  • 0

I am trying to get a handle on using URL hashes in jQuery to control history in Ajax and make links / pages book-markable. I have tried almost every plug-in out there, and I cant seem to get any to work properly, so I dont have any code examples really. But I am open to any suggestions, information, tutorials, etc.

The difference on one of the pages I am trying to incorporate this into is that I have a jQuery animation driven splash/loading page, which is also the same page that all of the content will be loaded into.

..and on this link, I want to by-pass all of the splash / loading animation and directly load the content based on the hash values / string (in this case, #home).

I’ve been trying to figure this one out for a while, any help is greatly appreciated, thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T00:50:33+00:00Added an answer on May 13, 2026 at 12:50 am

    So what are you having problems with? Setting the hash tag or handling the change of the hash?

    Of course setting the hashes is simply a question of putting the hashes in links, for example <a href="www.voidsync.com/2010/#page">Link</a> but I’m guessing that’s not your problem.

    To actually do something with the hash, you must have a listener function that checks for example every 100ms has the hash changed and acts accordingly. A simple function could go like this:

    $(function() {
        var current_hash = false;
        setInterval(function() {
            if(window.location.hash != current_hash) {
                current_hash = window.location.hash;
                $('#content').load("content.php?page="+current_hash);
            }        
        }, 100);    
    });
    

    That (untested) function would check every 100ms if the hash has changed, and if it has, then updates the page via Ajax.

    This function also works on page load, so if user lands on the page with a link such as www.voidsync.com/2010/#images, the function will load the page ‘images’ automatically. So history and bookmarking works.

    Hope that helps, just ask if you meant something else.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying get all html links within a string and replace them using
I am trying get all html links within a string and replace them using
I'm trying to streamline my login system by using ajax to handle to back
I am trying to get the handle of a window from a process. Now,
I'm trying to get a handle on whether we have a problem in our
I am trying to get a handle on Solrnet and interacting an ASP.NET site
I'm trying to get a handle to the foreground window in C#/Net 2.0/WinForms by
I am trying to get a list of receivers that handle android.intent.action.BOOT_COMPLETED for other
I'm trying to get a custom handler to work for a specific URL (or
I'm trying to get the html content of a page using silverlight. Webresponse and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.