Skip to content

Latest commit

 

History

History
34 lines (18 loc) · 600 Bytes

README.md

File metadata and controls

34 lines (18 loc) · 600 Bytes

jQuery Center Plugin

What's it do?

Centers any element to the browser window. This plugin will also center any element to it's relative or absolute positioned parent element.

Options

fixed: true

By default, direct children of the body element are fixed. If you'd rather those elements scrolled with the window set fixed to false.

Usage

HTML

<div></div>

JS

$("div").center()

or

$("div").center({
    fixed: false
})

The jQuery Center plugin was brought to you by the letter j and the number 5.

@camskene