juto:jessepollack-card

v1.0.2Published 6 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

A wrapper for Jesse Pollack's jessepollak.github.io/card credit card UI:

card

For more info see Jesse Pollack's repo.

Installation

    meteor add juto:jessepollack-card

Example

HTML:

1    <template name="creditCardCheck">
2      <div class='card-wrapper'></div>
3      <form id="cc">
4        <input type="text" name="number">
5        <input type="text" name="first-name"/>
6        <input type="text" name="last-name"/>
7        <input type="text" name="expiry"/>
8        <input type="text" name="cvc"/>
9      </form>     
10    </template>

JS:

1    Template.creditCardCheck.onRendered(function(){
2      this.$('#cc').card({
3        // a selector or DOM element for the container
4        // where you want the card to appear
5        container: '.card-wrapper', // *required*
6        formSelectors: {
7          nameInput: 'input[name="first-name"], input[name="last-name"]'
8        }
9      });
10    });
11