1
私は入力親に対して余白を持つために親クラスを置くこの関数を持っています。私は少し親のbehaiviorを変更し、この "$(this).parent().addClass('cooling');
"を " $(this).parent().animate({ marginRight: "200px" }, slow);
"と置き換えたいと思いますが、そのアニメーションの余白をぼかす方法を知りません。誰も私を助けることができるなら...私の関数のぼかしに関する.animationを削除する
function inputWidth(){
$('input[type=text]')
.focus(function() {
if ($(this).val().length > 21) {
$(this).data('default', $(this).data('default') || $(this).width());
$(this).stop().animate({width: 300}, 'slow');
$(this).parent().addClass('cooling');
//$(this).parent().animate({ marginRight: "200px" }, slow);
}
})
.blur(function() { /* lookup the original width */
$(this).stop().animate({width:
$(this).data('default')},'fast');
$(this).parent().removeClass('cooling');
});
};
いいえ、動作していません.... – BurebistaRuler