A sole trader is a business in which one person provides the permanent finance and, in return, has full control of the business and is able to keep all of the profits.
Matt Hobbs has developed a neat little jquery plugin which allows differnet page elements to have an equal height. This plugin is very easy to implement, simply being a case of setting the elements you wish to equalize in a jquery call.
<div id="advantage">
</div>
<div id="disadvantage">
</div>
Attach the JQuery library
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
You can also download your own copy of the JQuery library.
Attach Matt Hobbs' Equal Columns script
/**
* @projectDescription Simple Equal Columns
* @author Matt Hobbs
* @version 0.01
*/
jQuery.fn.equalCols = function(){
//Array Sorter
var sortNumber = function(a,b){return b - a;};
var heights = [];
//Push each height into an array
$(this).each(function(){
heights.push($(this).height());
});
heights.sort(sortNumber);
var maxHeight = heights[0];
return this.each(function(){
//Set each column to the max height
$(this).css({'height': maxHeight});
});
};
In the head of your page use a jquery call to set which elements must be equalized.
<script type="text/javascript">
jQuery(function($){
//Select the columns that need to be equal e.g
$('#advantage,#disadvantage').equalCols();
});
</script>
If you have encountered a problem with this demonstration, or would like an amendment made to the referencing and attributions of the scripts and code used on this page, please send the CHouseLive team an email: cara_remove_@chouselive_remove_.org