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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:21:50+00:00 2026-06-15T09:21:50+00:00

I have a project that I have built which uses a simple mechanism, when

  • 0

I have a project that I have built which uses a simple mechanism, when a set of icon links are clicked, a div layer animates into the content area – then requires the user to click a ‘close’ button to animate the div in the reverse, meaning setting opacity to 0 and sliding back out of view.

With the div ‘open’, there are links to external pages (labeled ‘GO’). Currently I have them opening in a new tab/window. However, the client would prefer that if you visit the external page link, then click your browser back button, the div would remain in its ‘open’ state.

Does anyone know of a relatively simple way to set this up – without completely reengineering the way I have it built? Or does it require some kind of advanced plugin and a complete rework of code?

The jQuery that opens the divs is here:

var triggerPanels = function(){
for(i=1; i <= 9; i++){
(function(e) {
var trigger = $("#iconTrig" + i);
var panel = $("#pane" + i);
$(trigger).click(function(){
    $(panel).animate({
     right: 0, opacity: 1
      }, 500 );

    return false;
});
 })(i);
 }
};

The link to a working version of the page is here, and if you click the Enter button, then click on one of the icons you will see it in action. Any help is greatly appreciated. Thanks!
http://dev.seanchristiandampier.com/asia-timber/index-dev-new.html

UPDATE: The client was happy to simply open the links in a new tab – so bypassing the need to use the hash for history purposes. However, all of the comments and answer here help point to a solution, and I may play around with this a bit on my own just so that I can absorb the concept, and see if I can get it working. 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-06-15T09:21:52+00:00Added an answer on June 15, 2026 at 9:21 am

    Not sure on the nitty gritty of your code but hooking into the window history is a relatively simple task. You can use the hash (everything after the # of the url) to work out your logic.

    Very simple solution:

    <div class="div">TheColor</div>
    <a href="#blue">Blue</a>
    <a href="#red">Red</a>​
    

    Then with jQuery:

    //capture the hash change event and do what you want with the window hash.
    $(window).on('hashchange',function(e){
        $('.div').css('background-color',window.location.hash.replace('#',''));
    });
    
    //Used to trigger the above event if someone links to the page with the hash set already.
    $(window).trigger('hashchange');
    

    Working example (you can’t see the hash because jsFiddle uses an Iframe, but try out clicking the buttons and the back button on the browser): JSFIDDLE

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

Sidebar

Related Questions

I have a small RIA that I built as a learning/make-my-life-easier project that uses
I have an Android project that uses a library project (all of which I
I have a simple project that uses a single library in order to run.
I have a project that is built and managed by Maven. I have a
I have a project that when built from my machine everything runs smoothly. However,
We have a project that has been built in Flash and as3. It is
I have a project that comprises pre-build Dll modules, built some time in the
I have inherrtied an IOS project that was being built primarly for iphone. When
I have an exe that is built and placed into a Setup project for
I have an Xcode 4 project that uses the Google Analytics SDK. The SDK

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.