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

  • SEARCH
  • Home
  • 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 7861401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:43:02+00:00 2026-06-02T22:43:02+00:00

I have an image, on clicking the image the URL changes but the page

  • 0

I have an image, on clicking the image the URL changes but the page is not reloaded(partial navigation). I have used window.location.href that fetches the current URL, but it displays the previous URL on console log. I want to fetch the URL after it changes.

Am I missing some window wait event?

  • 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-06-02T22:43:03+00:00Added an answer on June 2, 2026 at 10:43 pm

    To retrieve the new hash of the page, use location.hash:

    var hash = window.location.hash;
    

    For a similar requirement in the past, I’ve used Ben Alman’s hashChange plugin. Once the plugin is included on page, you can attach code to the hashChange event:

    $(window).hashchange( function(){
        // Your code here
    })
    

    Here’s a working fiddle to demonstrate.

    Additional Information

    This SO post is worth reading: On – window.location.hash – change?

    Note

    If you don’t want to use a plugin, you’ll have to post your markup before I can provide an alternative solution.

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

Sidebar

Related Questions

I have a custom list, and I've added a 'Page Image' field by clicking
Right now I have a image gallery that changes images when a user clicking
I have image map that can I move, but this map will be so
I have the following CSS code: .yellow { background-image: url('/images/yellowlight.png'); background-repeat: no-repeat; height:100%; width:100%;
I have a webpage and a F-Share button. On clicking this button, an image
Purpose is to have a small icon on my admin page. Clicking this icon
I have an image inside a div tag so that on clicking this image,
After clicking on an image, the user is redirected to a new page like:
I have an image upload form and it works fine. But underneath that same
I have a like button in my page. On clicking the Button, I am

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.