jQuery Plugin To Set Any Elements As Full Window - feight

jQuery Plugin To Set Any Elements As Full Window - feight
File Size: 5.86 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

feight is a super tiny jQuery plugin which has the ability to set any block elements to fullscreen (full window) for your one page scrolling webpages. You can set the custom breakpoints to decide whether to trigger the plugin when the window's size is smaller/larger than a specific value.

How to use it:

1. Download and include the jQuery feight plugin after you've included jQuery library.

<script src="//code.jquery.com/jquery-3.1.0.slim.min.js"></script>
<script src="jquery.feight.js"></script>

2. Call the function feight on the target block element as follow. By default the plugin will automatically update the height of the element on each window resize.

$('.content').feight();

3. Set the staring/ending breakpoints to trigger the feight function.

$('.content').feight({
  start: {
    fromWidth: 700,
    toWidth: false,
    fromHeight: false,
    toHeight: false
  }
});

4. Enable the 'half height' mode.

$('.content').feight({
  halfHeight: true
});

5. Enable the minimalist height:

$('.content').feight({
  minHeight: true
});

6. Disable the auto update on window resize.

$('.content').feight({
  updateOnResize: false
});

This awesome jQuery plugin is developed by ajshortt. For more Advanced Usages, please check the demo page or visit the official website.