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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:51:29+00:00 2026-05-23T19:51:29+00:00

I am working with a SAAS CMS and there is no variable for me

  • 0

I am working with a SAAS CMS and there is no variable for me to grab if I am on a section landing page or a paginated page. I need to be able to hide a div if I am on a page that contains "?page=" in the URL. Is there any successful way to do this with jQuery? I have tried several solutions offered up on SO, but none of the solutions I have tried works for my situation.

Just adding another note here. URLs out of the CMS that need to be targeted are looking like this foo?page= or bar?page= so I am just trying to detect the ?page= portion and hide the div if that is present. Thanks!

Have tried:

$(document).ready( function() {
if (/\/?page=\//.test(window.location)) {
    $('#collection-description').hide();
    }
 });

and

$(document).ready( function() {
       if ($('a[href*=page']).size() > 0) {
      $('#collection-description').hide(); 
   }
});

Any other directions to try would be awesome. 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-23T19:51:29+00:00Added an answer on May 23, 2026 at 7:51 pm

    Try taking a look at these pages:

    Get current URL in JavaScript?

    https://developer.mozilla.org/en/DOM/window.location

    You should be able to to use window.location.search to break out the elements you need. All major browsers should support this, though I haven’t tested them myself.

    So you could try something like this for the detection:

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
    <html>
      <head>
      <title></title>
      <script type="text/javascript" src="jquery-1.6.2.min.js"></script>
    
      <script type="text/javascript">
      function matchSearchLocation(key) {
         var list = window.location.search.split("&");
    
         for (var i=0;i<list.length;i++) {
           var item = list[i].split("=")[0];
           if (i === 0) 
             item = item.substr(1,item.length - 1);
    
           if (item === key) return true;
         }
        return false;
      }
    
      $(document).ready(function(){
        if (matchSearchLocation("page"))
          $(".container").hide();    
        else
          $(".container").show();
      })
    
      </script>
    
      <style type="text/css">
        .container {
          background-color:#000;
          width:100px;
          height:100px;
        }
      </style>
      </head>
      <body>
       <div class="container">
       </div>
      </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a new SaaS app that I'm working on, I want the end user
I'm working on a SaaS project that will have each customer having an instance
I'm working on a SaaS application where each customer will have different configurations depending
Working with a SqlCommand in C# I've created a query that contains a IN
Working on a somewhat complex page for configuring customers at work. The setup is
Working on a project that parses a log of events, and then updates a
Can you offer a bit of advice. I am using a hosted SAAS CMS
HI all, I am working on SaaS Hosting Software. a large number of sites
I'm working on a SaaS project and mysql is our main database. Our applications
I'm currently working on a SaaS type application, and for multi-tenancy I've settled on

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.