I feel so so stupid for forgetting this, but I've been out of practice for a minute, and I'm drawing a blank.
Why is slideDown being called onload rather than when the click is handled?
function buttonClicked(buttonNumber) {
$contentBox.slideDown("slow");
};
$button1.click = buttonClicked(1);
buttonClicked. The()after a function reference always calls the function. Example:function foo() { alert(42); }; foo();. Herefoois called because I put()after the variable name. Btw, if$button1is a jQuery object, then you have to pass a function reference to the.clickmethod, not assign a value to it. See learn.jquery.com/events.