Revert "Revert "Updated JS to match HTML""

This reverts commit 9eba1ac9f40b88f816fe33381bdc350b6558957c.