🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

First Visit Popup is tiny jQuery plugin which uses browser cookies to show up a modal popup (e.g. welcome modal) to first-time visitors.

Modal popup

Documentation

First Visit Popup

Version 1.2

Introduction

First Visit Popup is a jQuery plug-in which shows the user a message on their first visit to a web page.

How to use it

  1. Add the file (jquery.firstVisitPopup.js) to your project, along with jQuery.
  2. Add an element to the page for your popup message.
  3. Add the following jQuery to your page, to be executed on load:
	$('#my-welcome-message').firstVisitPopup({ 		cookieName : 'homepage', 		showAgainSelector : '#show-message' 	});

...where '#my-welcome-message' is a selector for the element added in step 2, cookieName is a name for cookie which will determine whether or not to show the message again, and showAgainSelector is the selector of an element on the page the user can click to show the message again (optional).

The script doesn't add any styling information, so you'll have to manually place the elements and hide them. See demo.html for an example.

Author and Acknowledgements


You May Also Like