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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:27:10+00:00 2026-05-20T09:27:10+00:00

When adding JQuery to hide a class it of course waits for the page

  • 0

When adding JQuery to hide a class it of course waits for the page to load then hides the class, same thing for ‘addClass’. There has got to be a better or faster way for it to ‘load’ as the page is loading. Anyone know of any ideas? I have given my sites JQuery scripts below with links to see them in action:

Hides sub filters: Link to example of my script to hide sub filters (notice left navigation filters)

if(jQuery('.refinement_category_section').length){
   jQuery('.refinement_custom_category_section').hide() &&
      jQuery('.refinement_filter').hide();
}

jQuery(document).ready(function(){                         
   if(jQuery('.refinement_category_section').length){
      jQuery('.refinement_custom_category_section').hide() &&
         jQuery('.refinement_filter').hide();
   }
});

OR

Adds a Class:Link to example of my script adding Class (notice left navigation filters)

$('.refinement_brand_section').parent().addClass('filterresults');

  • 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-20T09:27:10+00:00Added an answer on May 20, 2026 at 9:27 am

    Using Firebug, it appears that the issue is with the number of images that you are loading. My suggestion is to dynamically load pictures for your items using javascript after applying your style changes or have a smaller number of items on the page (or both). This will result in a degraded, but still functional interface for non-javascript users. For javascript-enabled browsers, you can adjust how and how many images are loaded to still achieve a nice effect.

    You should also use sprites for your small interface elements so that you’re downloading a single image and using CSS to display various portions of it. Combining your javascript files and stylesheets for your production site would also help quite a bit — you’ve got 20+ js files and 13+ stylesheets, each of which requires a separate request. You might want to run YSlow and follow it’s other recommendations.

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

Sidebar

Related Questions

I am using jQuery to show and hide a div by adding/removing a class
i am adding collection of radio buttons to my page using jQuery below $(document).ready(function()
I have the following JQuery statement and it is adding the class 'current' but
There are times when it's useful to hide certain HTML elements on your page
I am trying to add the functionality of adding jquery into an application. I
Short of adding in some jQuery to change the height of the #inner_page container,
I'm having trouble adding icons to jQuery UI's buttonset's.Adding icons to buttons work fine.Does
How do I go about adding styles to jquery buttons on a dialog? I
With jquery, I'm dynamically adding rows. To do this, I'm copying the first of
I'm adding a table dynamically to JQuery MObile UK Table goes on like this

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.