Updates the chapter Ids in the DOM