You also need to do that in resize
event, try this:
$(document).ready(function() {
$(window).resize(function() {
var bodyheight = $(this).height();
$("#sidebar").height(bodyheight);
}).resize();
});
More Related Contents:
- jQuery get the rendered height of an element?
- Get height of div with no height set in css
- Setting equal heights for div’s with jQuery
- How do I get the height of a div’s full content with jQuery?
- Triggering jquery with css media queries
- jquery – keep window from changing scroll position while prepending items to a list?
- Resize event firing multiple times while dragging the resize handle
- jquery get height of iframe content when loaded
- How do I get the real .height() of a overflow: hidden or overflow: scroll div?
- How do I get the offset().top value of an element without using jQuery?
- jQuery web page height
- Mobile Safari $(window).height() URL bar discrepancy
- Best way to remove an event handler in jQuery?
- jQuery Event : Detect changes to the html/text of a div
- jQuery table sort
- jQuery ‘input’ event
- Determine if $.ajax error is a timeout
- How to force a html5 form validation without submitting it via jQuery
- Codeigniter session bugging out with ajax calls
- Use ASP.NET MVC validation with jquery ajax?
- jQuery AJAX calls in for loop [duplicate]
- Set focus on div contenteditable element
- Load website into DIV
- fancy box work with iframes in beforeShow function?
- jquery ui dialog box need to return value, when user presses button, but not working
- jQuery $.animate() multiple elements but only fire callback once
- Selecting text on focus using jQuery not working in Safari and Chrome
- Refresh (reload) a page once using jQuery?
- TypeError: $(…).parents(…).size is not a function
- JQuery Star Rating [closed]