Giter Site home page Giter Site logo

Comments (23)

luanmuniz avatar luanmuniz commented on May 22, 2024

What is the problem exactly? What happens? Try to be as descriptive as possible.

from card.

stanggt3 avatar stanggt3 commented on May 22, 2024

Everything looks normal, however, none of the events to change the visual style of the card get fired, even when adding standard alerts into those functions. I have two identical examples based on the example in the package. One in HTML and another in an aspx page. HTML works fine, aspx wont fire at all. Im trying to paste the code but it won't display correctly

from card.

luanmuniz avatar luanmuniz commented on May 22, 2024

You can paste your code in a gist and link here!

from card.

stanggt3 avatar stanggt3 commented on May 22, 2024

https://gist.github.com/stanggt3/24c3829ed48f8e3be053

I have tried it with and without having an ID on the inputs

Also, the card.js file is unchanged, and the default file is using the initialize function
$('.form-container').card({ container: $('.card-wrapper')})

from card.

stanggt3 avatar stanggt3 commented on May 22, 2024

No errors are shown in console while testing

from card.

luanmuniz avatar luanmuniz commented on May 22, 2024

Can you post your default.js in the gist? There is no problem on the html

from card.

luanmuniz avatar luanmuniz commented on May 22, 2024

Apparently, the primary selector need to be a <form> element.
I made some tests, and when you change $('.form-container' to $('#form') the script works

from card.

stanggt3 avatar stanggt3 commented on May 22, 2024

Awesome, thank you!

from card.

stanggt3 avatar stanggt3 commented on May 22, 2024

It looks like it stopped working again when using a page that uses a master page, I'll see if I can figure that out

from card.

jessepollak avatar jessepollak commented on May 22, 2024

Thanks for helping with debugging @luanmuniz 👏

Unsure why it would need to be a form element, can look into it.

from card.

jessepollak avatar jessepollak commented on May 22, 2024

It's because of this line. There's no need for that to be there, so I'm going to remove it.

from card.

luanmuniz avatar luanmuniz commented on May 22, 2024

👍

from card.

jessepollak avatar jessepollak commented on May 22, 2024

@stanggt3 can you give this a go and let me know if it works?

from card.

luanmuniz avatar luanmuniz commented on May 22, 2024

@jessepollak tested and working \o/

from card.

stanggt3 avatar stanggt3 commented on May 22, 2024

Still seems to have some kind of issue finding the input boxes now. The following code throws an error of undefined is not a function.

if (this.options.formatting) {
      this.$numberInput.payment('formatCardNumber');

This is how the textbox is rendered when runat server in asp https://gist.github.com/stanggt3/521aa9715c0075f52b90

from card.

luanmuniz avatar luanmuniz commented on May 22, 2024

@stanggt3 did you update your card.js?
Did you change the numberInput option to the new id?

from card.

stanggt3 avatar stanggt3 commented on May 22, 2024

Yes I did

from card.

luanmuniz avatar luanmuniz commented on May 22, 2024

the numberInput too?
$('.form-container').card({ container: $('.card-wrapper'), numberInput: $('#tbCardNumber') })

I did some tests here and it's working normally. =/

from card.

stanggt3 avatar stanggt3 commented on May 22, 2024
$('#paymentInfo').card({
    container: '#paymentInfo', // *required*
    numberInput: '#tbCardNumber', // optional — default input[name="number"]
});

from card.

luanmuniz avatar luanmuniz commented on May 22, 2024

You need to put the jQuery Object, need to be $('#tbCardNumber'), just the selector #tbCardNumber wont work (for all options)

from card.

stanggt3 avatar stanggt3 commented on May 22, 2024

That was it. Thanks for all the help!

from card.

luanmuniz avatar luanmuniz commented on May 22, 2024

We found 2 bugs because of you Thanks!! hahaha 👍

from card.

jessepollak avatar jessepollak commented on May 22, 2024

@luanmuniz I'll fix that right now, it should be allowed to be either :/

from card.

Related Issues (20)

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.