Simple openLightbox doesn't work

Got the same problem so thought about reviving this post.

Note: Use the name of the lightbox and not the lightbox’s ID when calling openLightbox() . You can find the lightbox’s name by selecting the lightbox and clicking the settings button.

This worked, even in Preview mode.