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.
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.
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 tojQuery()
). See WordPress codex for more information.