This time I will share jQuery Plugin and tutorial about jQuery Plugin To Center HTML Elements Vertically – vResponse.js, hope it will help you in programming stack.
File Size: | 4.2 KB |
---|---|
Views Total: | 518 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
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.
1 |
< script src = "//code.jquery.com/jquery-1.11.3.min.js" ></ script > |
2 |
< script src = "vResponse.js" ></ script > |
2. Make your element always be centered in the screen after page loading.
1 |
$( function () {$( '#demo' ).vResponse;}); |
3. Re-position your element at a custom animation speed (750ms) after every resizing moment of browser.
1 |
$(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.
source : jqueryscript.net