EDIT BELLOW
How do I code the #west animation call on the #contentBox animation when it completes?
Basically I have a toggle button that animates/changes a div's css and then to another div's css once/after the first animation completes; then reverses the next time the toggle is executed.
Any help is appreciated. Thank-you.
The Conditional Statements:
$("#menuToggle").click(
function() {
var $west = $("#west");
var $contentBox = $("#contentBox");
$contentBox.animate({
marginLeft : parseInt($contentBox
.css('marginLeft'), 10) == -320
? $contentBox.outerWidth()
: -320
});
$west.animate({
left : parseInt($west
.css("left"), 10) == 0
? -$west.outerWidth()
: 0
});
});
I went to the old fashoned way with out shorthanding the conditional statement