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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:23:33+00:00 2026-06-12T21:23:33+00:00

I have a question on jQuery / Ajax, I don’t know if what I

  • 0

I have a question on jQuery / Ajax, I don’t know if what I want to do is ok or not, hope it is.

Anyways here’s the problem:

I have multiple hidden divs in a page, that are showed on a click of a link that has a class, the reason is so that I don”t have 30+ html pages to do.

But I have a slider on the homepage that when we click on, redirects to this page, and has to execute that show commande.

Here is my logic:

if previousUrl='index.html#cool'{
     hide '#main';
     show '#cool';
}

Is this possible ?

Thanks in advance !

  • 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-12T21:23:35+00:00Added an answer on June 12, 2026 at 9:23 pm

    You should not rely on previous URL.
    On your homepage, you could have redirections to your specific page with a hashtag

    'yourpage#div-to-show'
    

    Then on that page, you can read the hashtag

    window.location.hash; // '#div-to-show'
    

    So you could achieve your stuff

    $('.div').hide() // Assuming your divs have class="div". However you could hide divs with CSS by default.
    $(window.location.hash).show()
    

    Hope this helps

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

Sidebar

Related Questions

i have one question about jquery ajax().. I created a table grid and there
Again I have a question regarding this plugin: http://t.wits.sg/2008/06/20/jquery-progress-bar-11/ What I want to achieve
I don't know if I've even asked the question properly, but I have a
I have an ajax question for you all. I want to return an array
Question: I have the below JavaScript handler for jQuery sortable. The problem is i
I have something like: <p:inputText...> <p:ajax event=keyup update=somefield listener=#{someBean.doSomething}/> </p:inputText> But I don't want
So, this question tells me that jQuery ajax requests don't insert script tags into
I just started learning JS and jQuery and have a question. I want to
I have implement the exact same concept for my project- http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/ My question is,
I have a question about jQuery load best practice. Imagine the following situation: $(#div).on('click',

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.