Skip to content

Instantly share code, notes, and snippets.

@vdchristelle
Last active December 22, 2015 15:29
Show Gist options
  • Select an option

  • Save vdchristelle/6492544 to your computer and use it in GitHub Desktop.

Select an option

Save vdchristelle/6492544 to your computer and use it in GitHub Desktop.
Input field placeholders and styling them
$(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");
});
//---------------------------//
//---- 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; }
/**
* 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