To make it easy for me to create lightbox for any web development projects, I made the simple lightbox function that you can I can easily add and call.

Step 1: Copy the scripts below to your javascript file.
[insert-code id=1]

Step 2: Create the contents of your lightbox, e.g:
[insert-code id=2]

Step 3: Call the lightbox function.
[insert-code id=3]

Where .mylib is the class name of your div in Step 2.#button is the id of the trigger. If the user clicks on the trigger, the lightbox will appear.

Leave a Reply