Wrote a little plugin for using the default value in text elements as label, you know. Look at the right hand side in the newsletter form for an example.
$.fn.label = function(options){
var default_settings = {
clearLabels : true
};
var settings = $.extend(default_settings, options);
return this.each(function(){
var elm = $(this);
if($(this).val().length > 0) {
$.data(elm, 'default', $(this).val());
elm.focus(function(){
if($(this).val() == $.data(elm, 'default')) {
$(this).val('');
}
}).blur(function(){
if($(this).val() == '') {
$(this).val($.data(elm, 'default'));
}
});
if(settings.clearLabels) {
$(this.form).submit(function(){
if($(this).val() == $.data(elm, 'default')) {
$(this).val('');
}
});
}
}
});
}
Front-End Book is run and primarily written by Mattias Hising, an experienced Lead Developer from Uppsala, Sweden. I try to focus my efforts on Front-End related issues, as I find the problems to solve are more complex and interesting than the ones in traditional back-end development.