Skip to content

Instantly share code, notes, and snippets.

View colewinans's full-sized avatar

Cole Winans colewinans

View GitHub Profile
@colewinans
colewinans / jquery_equal_heights.js
Created November 15, 2012 22:07
Equalize Div Heights
$.fn.setAllToMaxHeight = function(){
return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) );
}
$(document).ready(function() {
$("div.equal").setAllToMaxHeight();
});
@colewinans
colewinans / gforms_dependent_values.js
Created November 12, 2012 15:05
Gravity Forms conditionally dependent values in jQuery
$("#input_1_9").change(function() {
if ($(this).val() == "" ) {
$("#input_1_16").val("Other (Non-US)");
} else {
$("#input_1_16").val($(this).val());
}
});