Updated the hide function to use vanilla JS.