Using LightBox as PreLoader

Please do not bump questions.

You get the error “TypeError: $w(…).hide is not a function” since hide() and show() are not API functions for a Lightbox.

You should read the Lightbox API documentation to see what features and functions are available:
openLightbox()
Lightbox API

Here’s a simple Lightbox example which you can load in the Editor, play with, learn how it works, and then adapt for your own use.