Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Create A Simple Splash Screen/Page?

I want to be able to design/implement a splash screen that originally goes over the home page (index.html). And when the visitor clicks on the enter page, you could say the Splash Screen disappears. I want to know how to do that without creating another page and without having to redirect.

I also want to be able to give the user the option to "Do Not Show This Again"...

For example, http://www.runescape.com/

Thank you very much, Aaron Brewer

like image 455
Aaron Brewer Avatar asked Feb 24 '23 04:02

Aaron Brewer


2 Answers

Have the default be that when a user visits a page, it pops up a screen using the Simplemodal jQuery plugin

When it loads it sets a cookie so that any future pageviews can check for that cookie or not. If its there, do not show the popup again.

like image 115
JiminyCricket Avatar answered Feb 26 '23 20:02

JiminyCricket


I advise having a container that holds both the splash screen (probably a div with the size of the site, assuming it has a defined width and height), and the homepage.

The homepage should be hidden (visibility: hidden), because some search engines don't really "like" the display: none.

Then, use a cookie scheme so that when the user already visited the homepage, doesn't have to view the splash screen again.

What I've done in the past is via a PHP, read if there is a cookie or not, and if there is (meaning the splash has been seen already) change the class of the splash screen (hiding it) and change the class of the homepage (showing it).

Of course this can be done via javascript.

like image 33
jackJoe Avatar answered Feb 26 '23 21:02

jackJoe