this worked great, thanks!
On Feb 13, 5:08 pm, J Moore <[EMAIL PROTECTED]> wrote:
> um, use a variable?
>
> var x = true;
> $("#container").click(function() {
> if (x) {
> $("#container").animate({"marginTop": "-=237px"}, "slow");
> } else {
> $("#container").anima
there's a toggle() method, too, that toggles between two functions.
like this:
$("#container").toggle(function() {
$("#container").animate({"marginTop": "-300px"}, "slow");
}, function() {
$("#container").animate({"marginTop": "300px"}, "slow");
});
:)
um, use a variable?
var x = true;
$("#container").click(function() {
if (x) {
$("#container").animate({"marginTop": "-=237px"}, "slow");
} else {
$("#container").animate({"marginTop": "400px"}, "slow");
}
x = !x;
});
On Feb 13, 3:05 pm, somedude <
3 matches
Mail list logo