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

  • Home
  • SEARCH
  • 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 6656165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:36:34+00:00 2026-05-26T01:36:34+00:00

var height = $(#mainbody).height(); $(#leftnav).css({height:height}); $(#leftnav).css({min-height:height,padding-bottom:15px,height:auto}); if($.browser.msie && $.browser.version < 7){ $(#leftnav).css({height:height}); $(#leftNavSearch ul

  • 0
var height = $("#mainbody").height();
$("#leftnav").css({"height":height});

$("#leftnav").css({"min-height":height,"padding-bottom":"15px","height":"auto"});

if($.browser.msie && $.browser.version < 7){

    $("#leftnav").css({"height":height});


    $("#leftNavSearch ul li").each(function(){

        if($(this).height() < 20){

            $(this).css({"height":"20px"});

        }else{

            $(this).css({"height":"auto"});

        }

    });     

}else if($.browser.msie && $.browser.version > 7){

    $("#leftnav").css({"height":"auto"});

}

The above function calculates the height of the #mainbody and #leftnav matches it.

However, as you filter through the JSON data on the page, you end up with a lot of white space on the bottom.

What would be the best method to recalculate the height, as the filter links are selected?

  • 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-26T01:36:35+00:00Added an answer on May 26, 2026 at 1:36 am

    First you should include Ben Alman’s great throttle plugin, which we will use limit the rate the resize function gets called.

    Next thing we take your script and put it into a function

    function resize_left_nav(){
        //YOUR SCRIPT GOES HERE        
    }
    

    After this we setup a custom event on the leftnav, which we will trigger to resize the column. We use throttle to limit the rate the resize_left_nav function gets called

    $('#leftnav').bind('resize-column',function(){
        $.throttle(250, resize_left_nav);
    });
    

    We want to trigger this event on two occasions:

    • on page load

      $(function(){ $('#leftnav').trigger('resize-column'); });

    • when the item list gets updated. Just tirgger the event, when your filtering has completed.

    To clean everything up a bit, we can wrap the whole code in an IIFE (Immediatly invoked function expression) like this:

    (function(){
        function resize_left_nav(){ ... }
    
        $('#leftnav').bind( ... );
    
        $(function(){ ... });
    })();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$.fn.equalHeight = function () { var height = 0, reset = $.browser.msie ? 1%
$(document).ready(function(){ function getDocumentHeight() { // What's the page height? var height = $('#mainbody').height(); alert(height);
I use this code to determine checkbox width and height: var chk = $('input[type=checkbox]:first');
I have a script that animates an element as follows: var item_height = $('#item').height();
public function bmdToStr(bmd:BitmapData,width:int,height:int):String { var encoder:JPEGEncoder = new JPEGEncoder(); var encBytes:ByteArray = encoder.encode(bmd); return
In the below code var panel=<div name=panel id=panel style=display:inline;position: absolute; margin-left: auto;margin-right:auto;left: 0;right: 0;width:350px;height:
I tried with something like this: var Height = $(this).naturalHeight; But it doesn't work.
For example: var $myContainer = $('#myContainer'); $myContainer.html(someHtml); var width = $myContainer.height(); var height =
I have a diva and its height is auto calculated using jquery using $(window).load(function(){
Mozilla & IE developers seem to have simultaneously changed the implementation of their height

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.