8000 GitHub - facilita-tecnologia/card at gh-pages
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

facilita-tecnologia/card

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Card

a better credit card form in one line of code

Card will take any credit card form and make it the best part of the checkout process (without you changing anything). Everything is created with pure CSS, HTML, and Javascript — no images required.

card

Usage

To use, you'll need to include the correct CSS and Javascript files into your HTML. You can find the necessary files at /build/js/card.min.js and /build/css/card.min.css and include them in your HTML like so.

<!-- in HEAD -->
<link rel="stylesheet" href="/path/to/card.min.css">
<!-- at the end of BODY -->
<script src="/path/to/jquery.js"></script>
<script src="/path/to/card.min.js"></script>

Once you've included those files, you can initialize Card.

$('form').card({
    // a selector or jQuery object for the container
    // where you want the card to appear
    container: '.card-wrapper', // *required*
    numberInput: 'input#number', // optional — default input[name="number"]
    expiryInput: 'input#expiry', // optional — default input[name="expiry"]
    cvcInput: 'input#cvc', // optional — default input[name="cvc"]
    nameInput: 'input#name', // options - defaults input[name="name"]

    width: 200, // optional — default 350px
    formatting: true // optional - default true
});

Development

To contribute, follow this steps:

$ git clone git@github.com:jessepollak/card.git
$ cd card
$ npm install
$ bower install
$ gulp watch

Now, if you go to localhost:8080 in your browser, you should see the demo page.

About

💳 make your credit card form better in one line of code

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 65.5%
  • CoffeeScript 28.3%
  • HTML 3.6%
  • JavaScript 2.6%
0