function clearIt(e){ if(e.value==e.defaultValue){ e.value=""; } } function defaultIt(e){ if(e.value==''){e.value=e.defaultValue;} } function sizeContent() { var baseHeight = 500; // Get a list of all sub nav items var subItems = $("#sidenav > ul > li").size(); // Assume half are splits, and that we don't have on on the end subItems = (subItems + 1) / 2; var height = 400 + (subItems * 30); // Set the min-height $(".inner-main").css("min-height", height + "px"); }