/ Published in: jQuery
Expand |
Embed | Plain Text
swapValues = []; $(".text_input_values").each(function(i){ swapValues[i] = $(this).val(); $(this).focus(function(){ if ($(this).val() == swapValues[i]) { $(this).val(""); } }).blur(function(){ if ($.trim($(this).val()) == "") { $(this).val(swapValues[i]); } }); });
You need to login to post a comment.
