基本的に、ボタンをクリックするたびに、2 つの異なるクリック機能を切り替えようとしています。
jqueryコードは次のとおりです。
$("button").click(function () {
$("#sidebar").animate({ width: '0px' }, 250, function() {
$(this).hide();
});
$("#tabs_container").animate({
width: "100%"
}, 500);
$("#tabs_container ul.tabs li a").animate({
width: "247px"
}, 500);
$("#myElement_wrapper").animate({
width: "970px"
}, 500);
});
$("button").click(function(){
$("#sidebar").show().animate({
width: "219px"
}, 500);
$("#tabs_container").animate({
width: "781px"
}, 500);
$("#tabs_container ul.tabs li a").animate({
width: "190px"
}, 500);
$("#myElement_wrapper").animate({
width: "720px"
}, 500);
});
ありがとう