jessepollak / card

:credit_card: make your credit card form better in one line of code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP error

matheusvigilato opened this issue · comments

I would like to use it on a php page, but it doesn't work. If I put the same code in HTML it works, but if I put it on a .php page, the card just appears and do nothing. What I need to do? Thanks

I am using the code below.

<div class='card-wrapper'></div>
<!-- CSS is included via this JavaScript file -->
<script src="http://matheusvigilato.com.br/mec/assets/js/cards/jquery.card.js"></script>
<form>
    <input type="text" name="number">
    <input type="text" name="name"/>
    <input type="text" name="expiry"/>
    <input type="text" name="cvc"/>
</form>
<script>

var card = new Card({
    form: 'form',
    container: '.card-wrapper',

    placeholders: {
        number: '**** **** **** ****',
        name: 'Arya Stark',
        expiry: '**/****',
        cvc: '***'
    }
});
</script>