$("#trigger-1").click(function() {
$("#secondary").animate({ width: 0 });
$("#primary").animate({ width: '100%' });
$("#panel-1").css({ display: "block" }).animate({
height: 200,
width: '100%',
opacity: 1
});
return false;
});
$("#trigger-2").click(function() {
$("#secondary").animate({ width: 0 });
$("#primary").animate({ width: '100%' });
$("#panel-2").css({ display: "block" }).animate({
height: 200,
width: '100%',
opacity: 1
});
return false;
});
$("#return").click(function() {
alert(1);
$("#primary").animate({ width: '60%' });
$("#secondary").animate({ width: '40%' });
$(".panel").animate({
height: 0,
width: 0,
opacity: 0
});
return false;
});
Le retour ne fonctionne pas pour panel-2
. S'il vous plaît vérifier ce violon: http://jsfiddle.net/HTVXv/ Aussi, s'il vous plaît me guider s'il est possible de refactoriser et de réduire le code.La fonction jQuery ne fonctionne pas
Merci!
+1 J'ai juste fourchu le violon pour montrer exactement cela. http://jsfiddle.net/lonesomeday/6HgX8/ – lonesomeday
Ah !! Merci. :) Possible de réduire les lignes btw? – 3zzy