An open API service indexing awesome lists of open source software.

https://github.com/toplan/fullscreen.js

Let the web page automatically full-screen
https://github.com/toplan/fullscreen.js

Last synced: about 2 months ago
JSON representation

Let the web page automatically full-screen

Awesome Lists containing this project

README

        

#fullScreen.js

lightweight and no dependencies js library let the web page automatically full-screen

#Usage

```html


// example 1:
//
// '#body1' min height(px) =
// [browser inner height] - [`#header` height] - [`#footer` height]
//

full('#body1').fixed('#header').fixed('#footer').render();

// example 2:
//
// '#body2' min height(px) =
// [browser inner height] - [`#header` height] - [`#footer` height] + 20
//

var fullBody2 = full('#body2');
fullBody2.fixed(['#header', '#footer']).plus(20).render();

// more:
fullBody2.autoResize(false);
fullBody2.resize();

```

# Method

### full(controlEle, opts);

create a fullScreen.js instance, return instance

### control(elementSelector)

The element of need to automatically covered, return instance

### fixed(elementsSelector)

the elements which fixed height, return instance

### autoResize(enable)

is reset body min height when window resize, return instance

### render()

begin to render, return true or false

### resize()

manual reset body min height, return true or false

### plus(number)

### minus(number)