Seems like jQuery removes the value of a input fields that has been slided up and then afterwards down. Not quite sure if it\'s the placeholder who does it but the built in slid
Error occurs when height of the input comes 0. You should change your method. Use css position with masking animate method:
Here is demo link. You'll inspect there will be no bug with this method.
jQuery:
$(document).ready(function () {
$('#slideUp').click(function () {
$('input[type="text"]').stop().animate({'top':'200px'},400);
});
$('#slideDown').click(function () {
$('input[type="text"]').stop().animate({'top':'0px'},400);
});
});
html:
css:
#mask { position:relative; 160px; height:25px; overflow:hidden; top:0; left:0; }
#motion { position:absolute; top:0; left:0; }
input { position:relative; }