Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

#jQuery Alignment Plugin

Plugin to align an Element to another.

##Features

  • vertical align
  • horizontal align (works most like margin: 0 auto;
  • minimum Values for left an top position
  • each element can be aligned to evey other element

##How to use

###align to window

$("#some-element").align();

###align to another Element

$("#some-element").align({'parent':'#the-parent'});

##auto-update on window-resize

$(document).ready(function(){
    $(window).resize(function(){
        $("#some-element").align();        
    });
});

##Options

keytypedefaultdescription
parentjQuery Selectorwindowthe Element where 'this' is aligned to
verticalbooleantrueenable/disable vertical alignment
horizontalbooleantrueenable/disable horizontal alignment
minLeftinteger or false0minimum Left Offset of 'this'. (false disables this feature)
minTopinteger or false0minimum Top Offset of 'this'. (false disables this feature)

##Compatibility this Version has been tested with jquery 2.0.1 only, but should work on earlier version as well.

About

Alignment Plugin for jQuery

Resources

License

Packages

No packages published