jQuery Plugin For Responsive Element With Specific Aspect Ratio - Responsive Ratio

jQuery Plugin For Responsive Element With Specific Aspect Ratio - Responsive Ratio
File Size: 9.89 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A jQuery responsive aspect ratio solution which allows to responsively resize your element while keeping a specific aspect ratio when browser's size changes. Helpful in modern web project that makes any element responsive while maintaining the aspect ratio you specify.

How to use it:

1. Add jQuery library and the jQuery Responsive Ratio plugin to your webpages.

<script src="//code.jquery.com/jquery-1.12.1.min.js"></script>
<script src="jquery.responsive-ratio.min.js"></script>

2. Call the function .makeResponsive() on your responsive element and specify the aspect ratio you prefer. That's it.

$('#el').makeResponsive({ratio:1});

Change log:

2017-02-20

  • tweaks

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