Skip to content

Instantly share code, notes, and snippets.

@pacoguzman
Created November 4, 2011 10:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pacoguzman/1339034 to your computer and use it in GitHub Desktop.
Save pacoguzman/1339034 to your computer and use it in GitHub Desktop.
ASPGEMS JS BestPractices - Placeholders
$(function() {
/* "Placeholder jQuery Plugin" */
$('input, textarea').placeholder();
/* "jQuery-Placeholder" */
$('input[placeholder], textarea[placeholder]').placeholder();
});
.placeholder {
color:#a9a9a9 !important;
font-style:italic !important;
}
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
color:#a9a9a9 !important;
font-style:italic !important;
}
/*
* Using pseudo selectors to style FF7 should be written separately
*/
input:-moz-placeholder, textarea:-moz-placeholder{
color:#a9a9a9 !important;
font-style:italic !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment