A simple plugin to add to your site that lets you specify a default value to be cleared on click, and to reappear when the input is left empty
Ruby JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
README
demo.html
jquery.autofill.js
jquery.autofill.min.js

README

Call the plugin like so:

	$(document).ready(function(){
		$('#txtSearch').autofill({
			value: 'Search for Keyword(s)',
			defaultTextColor: '#666',
			activeTextColor: '#333'
		});
	});
	
/*------- New Option (Mar 4 2010)------*/
Now you can add your custom "prePopulate" to your inputs. For example, if you have a website field, you may want it to start with 'http://'

$('#txtWebsite').autofill({
  value: 'Website',
  prePopulate: 'http://'
});