さて、私はまだjQueryのコツをつかもうとしています。
私はほとんどそれを手に入れました!閉じるボタンを閉じる必要がありますが、同じコンテナー内にあるため、他のアニメーションも開始します。助言がありますか?
これまでのコードの jsfiddle リンクは次のとおりですhttp://jsfiddle.net/w39Bb/5/
$('.outer-shell').click( function () {
$(this).animate({
height: '580px'
}, 750).addClass('selected');
$(this).find('.inner-shell').animate({
height: '550px'
}, 750);
$(this).find('.details-click').animate({
width: "0"
}, 400).hide(100);
$(this).find('.image-left-small , .image-right-small').animate({
opacity: 0
}).hide(400);
$(this).find('.image-left-large, .image-right-large').animate({
opacity: 1
}).show(0);
$(this).find('.close').animate({
opacity: 1
}, 1000).show();
});
$('h1.close').click(function () {
$('.outer-shell').animate({
height: '235px'
}, 200).removeClass('selected');
$('.inner-shell').animate({
height: '229px'
}, 200);
$('.details-click').animate({
width: '299px'
}, 100).show();
$('.image-left-small , .image-right-small').animate({
opacity: 1
}, 100).show();
$('.image-left-large, .image-right-large').animate({
opacity: 0
}, 400).hide();
});
$('.outer-shell').hover( function () {
$(this).toggleClass('hover');
});