I've made an adjustment so that a thread can have multiple accepted answers and it works except that when the checkmark is clicked, the checkmark of any previously accepted answer goes from green to gray. I know it works outside of that because when I reload the page, they're both green. So I'm trying to track down the root cause and getting confused by the javascript/event binding (I'm new to js and html fyi)

I get the sense that the event binding for accepting answers leads to the callback_accept function, and that the important stuff is here:

$(answers).removeClass('accepted-answer');$('#' + answerContainerIdPrefix + postId).addClass('accepted-answer');