Created
November 4, 2011 10:09
-
-
Save pacoguzman/1339034 to your computer and use it in GitHub Desktop.
ASPGEMS JS BestPractices - Placeholders
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
/* "Placeholder jQuery Plugin" */ | |
$('input, textarea').placeholder(); | |
/* "jQuery-Placeholder" */ | |
$('input[placeholder], textarea[placeholder]').placeholder(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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