-
-
Save iredun/0312a9b97bf505f8a3d7 to your computer and use it in GitHub Desktop.
Функция меняет value и placeholder местами и удаляет потом value у всех элементов класса inputtext(в данном случае использовал для элементов input)
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
<script> | |
$(document).ready(function() { | |
$('.inputtext').val(function() { | |
$(this).attr('placeholder',$(this).val()); | |
return ''; | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment