node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


What it is

biginjapan.js sets the height of an element based on the height of the browser window.


biginjapan.js is available as an npm package.

npm install biginjapan --save

Add biginjapan.min.js to the bottom of the <body> like this:

    <script src="biginjapan.min.js"></script> 


<div data-biginjapan="true"></div>


Options can be passed via data attributes. Append the option name to data-biginjapan-, as in data-biginjapan-percentage="".

Name Type Default Description
percentage number 100 0 - 100%
exclude selector false A valid CSS selector of an element you want biginjapan to exclude from it's height.


Function Description
BigInJapan.update() Run after DOM has changed
BigInJapan.pause() Pauses resize event listener

Browser Support

Coming soon


The code is available under the MIT License.