jQuery Plugin For Responsive Height of Elements - Responsive Height

jQuery Plugin For Responsive Height of Elements - Responsive Height
File Size: 4.3KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Responsive Height is an easy and useful jQuery plugin for handling the Height property in responsive web design. The plugin will detect and calculate the height of an element relative to its width. Resize the window of the demo page to see it in action.

How to use it:

1. Include the latest jQuery library and jQuery Responsive Height plugin on the page

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="./js/jquery.responsiveheight.js"></script>

2. The Html

<div id="square" class="responsive" hrelation="1"></div>

3. Call the plugin

<script type="text/javascript">
	$(document).ready(function(){
		$('.responsive').responsiveheight();
	});
</script>

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