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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:36:06+00:00 2026-06-13T22:36:06+00:00

I am looking for a listener to body resize. I need something similiar to

  • 0

I am looking for a listener to body resize.
I need something similiar to $(window).resize() but for the body.

Why do I need it for the body? I add content using ajax and it might change the body size (depends on user’s resolution).

How can I make body resize listener / where can I find one?

EDIT:
except for the ajax, I got accordion.
each Item has different height and therefore can cause the body to resize…

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-13T22:36:07+00:00Added an answer on June 13, 2026 at 10:36 pm

    There is no reliable way to listen for body resize, BUT you can listen for animation occurring in your accordion. There are two ways to do this, but one of them is cooler.

    Somewhere in your accordion script you have a jQuery .animate statement. If you don’t and are using a shortcut like .show(200) or .fadeIn, you will need to convert it to a .animate statement. All these commands are really just shortcuts for .animate anyway. If you are using slideUp and slideDown. You will have to save the height of your elements when the slider is initialized for use later (this is what jQuery is doing behind the scenes btw).

    Next you will want to use the step property of .animate to listen for the presence of the scrollbar:

      $(accordionSlideToShow).animate({
            height : 200
            step : function(){
                //scrollbar checking and css control script here
            }
      }, 2000);
    

    But if you want to be cooler, you can add custom events to your widget. This way future development can tie into these events as free functionality.

      $(accordionSlideToShow).trigger('ron-accordion-slideWillShow').animate({
            height : 200
            step : function(){
                 $(accordionParentElement).trigger('ron-accordion-animationOccurring');
            }
      }, 2000, function(){
          $(this).trigger('ron-accordion-slideDidShow');
      });
    

    Now you can tie into your widget’s new event model and listen for animation and scrollbars like so:

      $(accordionInstance).on('ron-accordion-animationOccurring', function(){
           //test for scroll bars and add css if needed
      });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was looking for something like 'load' listener of store in Extjs 4, but
So I'm looking at how listener taps work. What I've come up with at
I'm looking to build an HL7 listener in C#. We are already parsing messages
Looking to do a bit of refactoring... Using NHibernate I have this query currently
Looking at the Slickgrid examples and using Google Chrome, I'm setting a breakpoint on
I am looking to remove a Doctrine Extensions life cycle event listener from within
I'm trying to build a Javascript listener for a small page that uses AJAX
I need help creating an efficient JS listener against an array of objects and
I am looking at implementing listener application for Salesforce Outbound Messaging. The walk through
i'm trying to figure out the ajax's tag 'listener' property, and from what i

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.