rendered paste bodyfunction checkText( input, event ) {
switch ($(input).attr("id")) {
case 'title':
default_val= 'Title';
break;
case 'content':
default_val= 'Content';
break;
case 'tags':
default_val= 'Tags- comma separated';
break;
}
switch (event) {
case 'focus':
if ( $(input).val() == default_val ) {
$(input).val('');
}
break;
case 'blur':
if ( $(input).val() == '' ) {
$(input).val(default_val);
}
break;
}
}
function focusText( input ) {
checkText( this, 'focus' );
}
function blurText( input ) {
checkText( this, 'blur' );
}
$(document).ready(function () {
$('#title, #content, #tags').focus(focusText).blur(blurText);
})