The code below drives a button that toggles various div s on the page on and off, and changes it own visible state - from dellie to tellie:
It works once as expected (usually) but the second time through,clicking dellie makes it disappear but tellie does not appear. Can anyone please help point out what I'm doing wrong? Or point to a better way of achieving what I'm after - a button that toggle show/hide div states.
$("#dellie").click(function(){
TweenLite.to("#tellie", 0.5, {display:"block", ease:Back.easeOut});
TweenLite.to("#dellie", 0.0, {opacity:0});
TweenLite.to(".inacc", 0.5, {opacity:0.4});
TweenLite.to(".note", 2.5, {display:"block", ease:Back.easeOut});
});
$("#tellie").click(function(){
TweenLite.to("#tellie", 0.0, {opacity:0});
TweenLite.to("#dellie", 0.5, {opacity:1});
TweenLite.to(".note", 2.0, {display:"none", ease:Back.easeOut});
TweenLite.to(".inacc", 0.5, {opacity:1});
});
Thanks