To further refine Wallace SidhréeWallace Sidhrée's code sample:
$(function() { $('input').focusin(function() { input = $(this); input.data('place-holder-text', input.attr('placeholder')) input.attr('placeholder', ''); }); $('input').focusout(function() { input = $(this); input.attr('placeholder', input.data('place-holder-text')); }); }) This ensures that each input stores the correct placeholder text in the data attribute.