Take a look at jQuery modals - by following their example, you will create a hidden HTML element in your page (styled however you wish).
Then, within your $(document).ready()
event, .show()
the modal. The ready
event only fires once after the webpage has finished loading.
There are many other ways to show custom modal popups within many other libraries; do some research since this is generally a trivial matter.