Skip to content

Instantly share code, notes, and snippets.

View joelbowen's full-sized avatar

Joel Bowen joelbowen

View GitHub Profile
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
@joelbowen
joelbowen / flushfooter.html
Created March 26, 2013 21:02
Flush Footer, HTML & CSS
<style>
html, body {
height: 100%;
}
#wrap {
min-height: 100%;
}
function hideAddressBar()
{
if(!window.location.hash)
{
if(document.height < window.outerHeight)
{
document.body.style.height = (window.outerHeight + 50) + 'px';
}
setTimeout( function(){ window.scrollTo(0, 1); }, 50 );