Skip to content

milaxcom/jQueryVerticalCenter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQueryVerticalCenter

##How to use

Include script after the jQuery library:

<script type="text/javascript" src="jquery.vcenter.min.js"></script>

Set styles for your container:

<style>
    #container {
    position:absolute;
    width:200px;
    height:200px;
    left:50%;
    margin-left:-100px;
    /* any styles */
    }
</style>
<div id="container"></div>

Use it how jQuery-plugin with options:

$("#container").verticalCenter({
    /** Optional: min height of client window (default: 420) */
    minClientHeight : 420,
    /** Optional: displacement of top position (default: 0) */
    topOffset : 0,
    /** Optional: change position on resize client window (default: false) */
    onResize : false,
    /** Optional: callback after set position */
    callback : function () { }
});

##Demonstration

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors