Skip to content

boeddo/centr.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

centr.js

----

Minimal jQuery plugin to center objects.

Getting Started

Getting started is simple: include jQuery, include Centr, then:

$('#object').centr(); // it's that easy

Usage

Centr contains a few options. You can center horizontal, center vertical, add a class & center the text.

center horizontal

$('#object').centr();
$('#object').centr({
    axisX: true
});

center vertical

$('#object').centr({
    axisX: false,
    axisY: true
});

horizontal & vertical

$('#object').centr({
    axisX: true,
    axisY: true
});

add class

$('#object').centr({
    addClass: true // add class "centered"
});

center the text

$('#object').centr({
    textCenter: true
});

Examples

Check my website for examples and more information: http://boeddo.com/centr

Support

Centr support almost every browser. That's great, huh?

Author

Centr is made by Quincy Kools.

License

Centr is licensed under the MIT License

About

Centr, a minimal jQuery plugin to center objects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published