Closed darkworks closed 2 years ago
If your CVC input field is id="cvc"
for example you can flip the card like this...
document.querySelector('#cvc').dispatchEvent(new Event('focus'));
thanks :)
@melloware one more question , can u tell how to change color of the card via js like by setting custom hex color ?
i tried but no success
jQuery(".jp-card-back:before").attr('style','background-color:'+color);
thanks
That I am not sure of with jquery as the cards are all rendered with some complex CSS so you might have to dig into it.
That I am not sure of with jquery as the cards are all rendered with some complex CSS so you might have to dig into it.
ya i checked sad thing is that annoying :before is used which is very hard to modify on runtime is its not part of dom :(
.jp-card.jp-card-visa.jp-card-identified .jp-card-front:before, .jp-card.jp-card-visa.jp-card-identified .jp-card-back:before {
background-color: #191278;
}
is it possible to change this color to normal css class instead of :before
or ;after
so that it give us devs control to set credit color as we like
thanks
I didn't design this library but changing all the cards now seem like a task that is not going to be done unless you make the changes and submit a PR
I didn't design this library but changing all the cards now seem like a task that is not going to be done unless you make the changes and submit a PR
ok right i will play with it to see how it goes
Am wondering how can i flip card manually like calling from js code , normally when u click on cvc field and input the card number its flipped . so am wondering how can we flip it through js code , any js method function which need to be called ? also other features like export image , svg etc will be good if added.
thanks