Last active
December 22, 2015 15:29
-
-
Save vdchristelle/6492544 to your computer and use it in GitHub Desktop.
Input field placeholders and styling them
This file contains hidden or 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
| $(document).ready(function() { | |
| // placeholder for newsletter input field | |
| $('.i18n-nl .newsletter .email').attr("placeholder", "Uw E-mailadres"); | |
| $('.i18n-fr .newsletter .email').attr("placeholder", "Votre adresse E-mail"); | |
| }); |
This file contains hidden or 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
| //---------------------------// | |
| //---- input placeholder ----// | |
| //---------------------------// | |
| //source: http://davidwalsh.name/html5-placeholder-css | |
| input::-webkit-input-placeholder { font-style: italic; color:#a2a1a1; } | |
| input::-moz-placeholder { font-style: italic; color:#a2a1a1; } /* firefox 19+ */ | |
| input:-ms-input-placeholder { font-style: italic; color:#a2a1a1; } /* ie */ | |
| input:-moz-placeholder { font-style: italic; color:#a2a1a1; } | |
| input:focus::-webkit-input-placeholder { color:transparent; } | |
| input:focus::-moz-placeholder { color:transparent; } /* firefox 19+ */ | |
| input:focus:-ms-input-placeholder { color:transparent; } /* ie */ | |
| input:focus:-moz-placeholder { color:transparent; } |
This file contains hidden or 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
| /** | |
| * Implements template_preprocess_html(). | |
| */ | |
| function the_aim_theme_commerce_preprocess_html(&$variables) { | |
| global $language; | |
| if(isset($language->language)){ | |
| $variables['classes_array'][] = 'i18n-'.$language->language; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment