Giter Club home page Giter Club logo

age-check's Introduction

age-check

A simple plugin that verifies if a user is old enough to enter your site.

You can easily customize the plugin with options and it uses sessionStorage (or localStorage) to keep from popping up again.

The modal box is responsive and uses an external CSS for easy styling.

Usage

Add inside document ready: $.ageCheck()

Options

  • minAge (Age to validate against)
  • redirectTo (URL to redirect when successful)
  • title (Title text above the prompt)
  • copy (Paragraph text below the title)
  • success (Callback to be called on successful validation, takes no arguments)
  • successMsg {header (Header on top of success message), body (text for success message)}
  • underAgeMsg (Message when user didn't pass age requirements)
  • underAge (Callback to be called on failed validation, takes no arguments)
  • errorMsg {invalidDay (message for invalid day entered), invalidYear (message for invalid year entered)}
  • storage (sessionStorage or localStorage, sessionStorage is the default)

To Minify JS + CSS

  • npm install gulp
  • npm install gulp-minify --save-dev
  • npm install gulp-clean-css --save-dev
  • npm install gulp-rename --save-dev
  • run gulp compress

alt tag

Click http://michaelsoriano.com/jquery-plugin-check-user-age/ for instructions and options

and

Click https://cdn.rawgit.com/michaelsoriano/age-check/master/index.html for demo

age-check's People

Contributors

michaelsoriano avatar fearlessflyer avatar oranges13 avatar michaelthessel avatar datashaman avatar g4mr avatar clintoncrick avatar

Watchers

Shanthosh Krishnakumar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.