placeholder style i wartości
taki sam placeholder dla każdego inputa w js:
$(document).ready(function(){
$('form').find("input[type=textarea], input[type=password], textarea").each(function(ev)
{
if(!$(this).val()) {
$(this).attr("placeholder", "Type your answer here");
}
});
});
—
style dla placeholder, kolor tekstu:
/* Placeholder text color -- selectors need to be separate to work. */
::-webkit-input-placeholder {
color: #686868;
font-family: Montserrat, "Helvetica Neue", sans-serif;
}
:-moz-placeholder {
color: #686868;
font-family: Montserrat, "Helvetica Neue", sans-serif;
}
::-moz-placeholder {
color: #686868;
font-family: Montserrat, "Helvetica Neue", sans-serif;
opacity: 1;
/* Since FF19 lowers the opacity of the placeholder by default */
}
:-ms-input-placeholder {
color: #686868;
font-family: Montserrat, "Helvetica Neue", sans-serif;
}
Hope this helps and happy coding :)
Zobacz jeszcze
przydatne metody jQuery
.offset().top - odległość wskazanego elementu od topu okna przeglądarki setMarginTopContent: function() { var $fromTop = $('.added-box .post-box').offset().top; $('.page...