You can do this with jQuery UI Accordion ( demo ):
CSS
html, body { height: 100%; padding: 0; margin: 0; overflow: hidden; } .accordion { height: 100%; }
script
$(function(){ $( ".accordion" ).accordion({ fillSpace: true }); $(window).resize(function(){
For newer versions of jQuery UI Accordion (v1.12.1 +), set heightStyle to fill , use "refresh" to update and set html and body height to 100% ( demo ).
CSS
html, body { height: 100%; padding: 0; margin: 0; overflow: hidden; }
script
$(".accordion").accordion({ heightStyle: "fill" }); $(window).resize(function() {
source share