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 8504347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:00:15+00:00 2026-06-11T02:00:15+00:00

Here is my JSFiddle . Yesterday I posted question that how to create hashtag

  • 0

Here is my JSFiddle. Yesterday I posted question that how to create hashtag url. I got an answer, but if I refresh, it start from initial.

For example: If I refresh on #content 2, it show #content 1. I don’t want that. I think I should use on load event. But don’t know how to implement here. Any solution for this ? Please help me.

  • 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-11T02:00:17+00:00Added an answer on June 11, 2026 at 2:00 am

    I’ve answered this at Create hashtag url using jquery. Just sharing this here because the linked thread was originally only about updating the URL with a hash tag (fragment identifier, actually), but the same issue about retaining the content after reload was eventually brought up by the OP in that thread.

    And for those who don’t wish to go the extra click, the codes are pretty straightforward. Just add the following after function setActive(i) { // codes }:

            var url = window.location.hash; // retrieve current hash value
            if(url.indexOf('Content') != -1){ // do the following if URL's hash contains "Content"
                // remove "#" symbol from retrieved hash value
                var currentHash = window.location.hash.substring(1).split("#");
                // remove "-" symbol from retrieved hash value
                var contentTitle = currentHash.toString().replace(/-/g, ' ');
                // store hash value in "actualContent" variable
                var actualContent = "This is " + contentTitle;
                // remove "selected" for every instance of "myclass" to hide content first
                $(".myclass").removeClass("selected");
                // find div that contains retrieved hash value's text stored in "actualContent" variable and add "selected" class to that div to display the correct content
                $("div:contains('" + actualContent + "')").addClass("selected");
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following on from a question I posted yesterday. Found here: Append different div id
This question is related to this question yesterday . Please see current jsfiddle here
I've got two problems here: http://jsfiddle.net/BtGtT/3 The first problem is that the footer should
In relation to a question I posted on here yesterday, I am trying to
My script is here : jsfiddle i have two attributes in my form that
I posted a question yesterday which was answered, sadly though I now have a
JSfiddle (showing the non-working code) here: http://jsfiddle.net/ts2Rr/ I have three boxes that a user
I am using Flot to create graphs. This is my Code here jsFiddle code
Someone else recently helped me out with the start of this question but I'm
See here: http://jsfiddle.net/QVhAZ/4/ How can I use * but only have it apply to

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.