Error creating slider in scene with two point cloud datasets

Error: “Uncaught TypeError: Cannot read properties of null (reading ‘offsetLEFT’) (on line 26)”

Image shows code used, I am trying to recreate the 3D Tiles Compare from the sandcastle examples but am running into the above error. Not sure how to move forward nor entirely understand what’s leading to the error.