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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:52:18+00:00 2026-05-24T07:52:18+00:00

The Solution: http://noteslog.com/post/how-to-fix-the-resize-event-in-ie/ Development Issue: I am having an IE7 compatibility issue with jQuery.

  • 0

The Solution:

http://noteslog.com/post/how-to-fix-the-resize-event-in-ie/

Development Issue:

I am having an IE7 compatibility issue with jQuery. Essentially what is supposed to happen is the resize event tells two divs to not show, and changes another div to visible. Then after a setTimeout occurs the divs are changed back on, and the other div that was shown is not shown; then reloads the page. This works fine in IE8, IE9, Mozilla, Chrome, and Safari. So this has to be something relevant to IE7. Any suggestions and ideas? I am always grateful for anything.

<script type="text/javascript">
    $(document).ready(function(){
        $(window).resize(function() {
            $('#res_mainContainer').css({"display":"none"});
                    for ( var h = 1; h < 100; h++)
                             {
                                    $('#CarLot' + h).css({"visibility":"hidden"});
                             } 
            $('#loading').css({"display":"block"});
              var constantResize =  jQuery(window).width() + 'x' + jQuery(window).height();
              $("#WINDOWS_RESOLUTION").text(constantResize);


        setTimeout( function() {
            $('#res_mainContainer').css({"display":"block"});
                    for ( var h = 1; h < 100; h++)
                             {
                                    $('#CarLot' + h).css({"visibility":"visible"});
                             } 
            $('#loading').css({"display":"none"});
            location.reload()
            }, 2000 );

        });
    });
</script>

The old JavaScript that was used when throttled:

<script type="text/javascript">
var timeoutId;
function throttleResize(fn) {
window.onresize = function () {
    window.clearTimeout(timeoutId);
    timeoutId = window.setTimeout(function () {fn.call();}, 1000);
    document.getElementById("loading").className = "loading-visible";
    document.getElementById('res_mainContainer').style.visibility = 'hidden';
             for ( var h = 1; h < 40; h++)
                 {
                 document.getElementById('Carlot' + h ).style.visibility = 'hidden';
                 } 
    };
}

function doSomething() {
window.location.reload(true);
document.getElementById("loading").className = "loading-invisible";
document.getElementById('res_mainContainer').style.visibility = 'visible';
             for ( var h = 1; h < 40; h++)
                 {
                 document.getElementById('CarLot' + h ).style.visibility = 'visible';
                 }
}

throttleResize(doSomething);

</script>
  • 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-24T07:52:19+00:00Added an answer on May 24, 2026 at 7:52 am

    Resize fires continuously in IE and in WebKit browsers, so when you reize the window you’re potentially calling your handler dozens or hundreds of times, so that’s probably why you’re seeing IE7 (with a much slower JS engine then IE8 or any other modern browser) lock up.

    Usually what you want to do is to throttle the resize event (call it less often). See here: http://mbccs.blogspot.com/2007/11/fixing-window-resize-event-in-ie.html

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

Sidebar

Related Questions

Note: solution at the end If I attempt to do a HTTP POST of
One possible solution could be simple HTTP get or post request, but that wouldn't
I'm trying to implement a solution using .htaccess and wildcard subdomains so that http://subdomain.example.com
I hope to create thumbnail from an UIImage/UIImageView. There are some undocument solution: http://ofcodeandmen.poltras.com/2008/10/30/undocumented-uiimage-resizing/
So someone's selling a comet chat solution: http://www.cometchat.com/ But I think it might be
Bonita Open Solution ( http://www.bonitasoft.com/ ) has many widgets for creating forms, but user
I'm trying to find a solution to add HTTP digest auth to a site
i am using the Toxi solution on this site for tagging bookmarks: http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html In
Using the method presented here: http://cslibrary.stanford.edu/110/BinaryTrees.html#java 12. countTrees() Solution (Java) /** For the key
like in this site: http://www.1stwebdesigner.com/resources/57-free-image-gallery-slideshow-and-lightbox-solutions/ it only loads the image when you are rally

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.