Credit card validation with not working in WordPress

I am using jQuery Credit Card Validation Plugin: Smart Validate to validate credit cards.

It is working fine, when downloaded it and implemented in my localhost.

Read More

But when I tried to implement the same in wordpress it is not working and when I checked the console I am getting:

TypeError: jQuery(...).ccvalidate is not a function
jQuery('.cc-container').ccvalidate({ onvalidate: function(isValid) {

Why its not working with wordpress? How can I resolve the issue?

In the fiddle you can see the normal working and there it is working fine.

Fiddle

Related posts

Leave a Reply

1 comment

  1. WordPress has jquery has jQuery.noConflict(); enabled, this means that the use of the $() shorthand doesn’t work by default. You could try wrapping the entire code in ()(jQuery); (or just change all the $()‘s to jQuery()). See WordPress codex for more information.