Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
LiquidHeight allows you to specify an HTML element that will (automagically) resize itself to fill the available height of the viewport
Ruby JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
assets
lib
test
MIT-LICENSE
README.rdoc
Rakefile
init.rb
install.rb
uninstall.rb

README.rdoc

LiquidHeight

LiquidHeight allows you to specify an HTML element that will (automagically) resize itself to fill the available height of the viewport. For instance, imagine the following markup:

<div id="statistics">
  <p>2 comments by 2 authors.</p>
</div>  

<div id="comments">
  <h2>Comments Section</h2>
  <ul>
    <li>I'm a comment!</li>
    <li>Whoa! I, too, am a comment.</li>
  </ul>
</div>
<%= liquid_height :comments %>

The “statistics” div will have it's normal (browser-calculated height), but the “comments” section will expand to fit the entire rest of the viewport.

Note: Be sure to run rake liquid_height:install to copy the appropriate JS file into your public/javascripts directory, and include the following in any layouts where you want to use the Liquid Height functionality:

<%= javascript_include_tag 'liquid_height' %>

Copyright © 2008 Centro, released under the MIT license. Authored by:

Something went wrong with that request. Please try again.