Cross Browser Horizontal / Vertical Centering With jQuery - anyElementCeneter
| File Size: | 5.05 KB |
|---|---|
| Views Total: | 419 |
| Last Update: | |
| Publish Date: | |
| Official Website: | Go to website |
| License: | MIT |
anyElementCeneter is a cross browser and responsive jQuery center alignment plugin which allows you to vertically and horizontally center any element in the screen.
How to use it:
1. Add the jQuery anyElementCenter plugin after you've added jQuery JavaScript library.
<script src="jquery.min.js"></script> <script src="anyDivCeneter.jQuery.js"></script>
2. The JavaScript to make a specified element always be centered in the screen whenever you resize the browser.
$('#element').anyElementCeneter();
3. Customize the centered element in the JavaScript.
$('#element').anyElementCeneter({
boxColor:'#3e3e3e', // background color
wrapColor:'#ccc', // background overlay color
contColor:'#cecece',
boxheight:300,
boxwidth:400,
border:'1px solid #2e2e2e',
wrapPadding:'4px',
borderRadius:'0',
boxShadow:'0 0 10px 0 #000',
zIndex:'9999'
});
This awesome jQuery plugin is developed by supunsameera. For more Advanced Usages, please check the demo page or visit the official website.











