...except that it also changes the checkbox with an ID of "18" to "checked" at the same time, for no readily apparent reason.
...and if I tell it to check/uncheck the checkbox with an ID of "18" it just doesn't do anything.
I think ... I may cry.
EDIT: I found it. Turns out that I had one function being used for two different (and contradictory) things. Broke it into two functions, and it works now.