1// JavaScript Document 2(function(jQuery){ 3 jQuery.fn.balance = function (options) { 4 var defaults = { 5 set_height : false, // false will set 'min-height', true will set 'height', 6 7 same_height : true, 8 same_width : false, 9 10 limit_height : false, 11 limit_width : false, 12 13 max_height : 100, 14 max_width : 100 15 } 16 var options = jQuery.extend(defaults, options) ; 17 $maxheight = $maxwidth = 0 ; 18 $class = jQuery(this) ; 19 20 $class.each (function () { 21 $maxheight = parseFloat(jQuery(this).height()) > $maxheight ? jQuery(this).height() : $maxheight ; 22 $maxwidth = parseFloat(jQuery(this).width()) > $maxwidth ? jQuery(this).width() : $maxwidth ; 23 }); // return this.each 24 if(options.same_height) { 25 $maxheight = options.limit_height ? (options.max_height <= $maxheight ? options.max_height : $maxheight) : $maxheight ; 26 //$class.height($maxheight) ; 27 if(options.set_height) { 28 $class.css({'height' : $maxheight+'px'}) ; 29 } 30 else { 31 $class.css({'min-height' : $maxheight+'px'}) ; 32 } 33 } 34 35 if(options.same_width) { 36 $maxwidth = options.limit_width ? (options.max_width <= $maxwidth? options.max_width : $maxwidth) : $maxwidth ; 37 $class.width($maxwidth) ; 38 } 39 40 } // $.fn.validate = function (options) 41})(jQuery) ;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.