I would write this as:

```
$('#moreinfo')
    .removeClass(happy ? 'sad' : 'happy')
    .addClass(happy ? 'happy' : 'sad');
```

or similar. Save a call to `.getElementById()`