Code Monkey home page Code Monkey logo

credit-card-type-detector's Introduction

jQuery Credit Card Type Detector Plugin

Detail: https://github.com/christianreed/Credit-Card-Type-Detector

Determines possible credit card types as a user types their credit card number.

Intended use is that you start with all possible card logos that you accept and gradually gray them out as the number excludes certain brands of cards. Helps give the user the impression that you know what you're doing and improve conversion.

Designed to work with the cards accepted by Stripe, but could extended to work with additional card types. Currently detects Visa, Mastercard, American Express, Diners Club, Discover, and JCB.

Graying the logos in and out is done with CSS classes. As the input changes, "on" and "off" classes are added to the card logo elements indicating whether that particular card type is possible.

Included is a transparent png file with various card types, some css, and a possible HTML structure. So pretty much cut and paste, but you could certainly build your own structure.

Basic Use:

$('#credit_card_input_field').creditCardTypeDetector({
    'credit_card_logos_id' : '#card_logos_ele'
});

By default no arguments are required, it looks for the logos inside the element with the ".card_logos" class.

credit-card-type-detector's People

Contributors

christianreed avatar lost-theory avatar

Watchers

James Cloos avatar Akshay Jagtiani 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.