を働いてきた
$('#billing_different').click(function(){
if($('#billing_different').is(':checked')) $('#checkout_address_billing').slideDown();
else {
$('#checkout_address_billing').slideUp();
}
});
:
// this will be set to true when an animation is running, reset to
// false when it completes.
//
var isanimated = false;
function resetIsAnimated() {
isanimated = false;
}
$('#billing_different').click(function() {
// Set a call back to set isanimated to false
//
if($('#billing_different').is(':checked')) {
if (isanimated == false) {
isanimated = true;
$('#checkout_address_billing').slideDown(200, function() {
resetIsAnimated();
});
}
}
else {
if (isanimated == false) {
isanimated = true;
$('#checkout_address_billing').slideUp(200, function() {
resetIsAnimated();
});
}
}
});
はそれがお役に立てば幸いです。
それは完全なアニメーションであることの問題です、あなたは半分それを停止できません。しかし、それはまだ良いアイデアです。 – Source
私はあなたのための停止を追加しました。 – Leeish