jQuery Plugin To Center HTML Elements Vertically - vResponse.js

File Size: 4.2 KB
Views Total: 549
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Plugin To Center HTML Elements Vertically - vResponse.js

vResponse.js is a very small (~1kb) jQuery plugin which allows you to vertically and dynamically center any html elements for your responsive, cross-platform website / web application.

How to use it:

1. Load jQuery JavaScript library and the jQuery vResponsive.js plugin at the end of the document.

<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="vResponse.js"></script>

2. Make your element always be centered in the screen after page loading.

$(function() {$('#demo').vResponse;});

3. Re-position your element at a custom animation speed (750ms) after every resizing moment of browser.

$(window).resize(function(){$('#demo').vResponse(750);});

This awesome jQuery plugin is developed by zargaripour. For more Advanced Usages, please check the demo page or visit the official website.