Answer the question
In order to leave comments, you need to log in
Javascript works fine in codepen but after integrating into Wordpress it gives NaN, what's wrong?
Hello.
Prepared the script "product calculator for the site" on jQuery. I check on codepen everything works. I transfer to wordpress, the script works but produces NaN.
I connect HTML and CSS through a shortcode, I connect JS from a file.
jQuery starts earlier, along with ContactForm 7
Link to codepen: https://codepen.io/svmaks/pen/xyEpJb
Please tell me what's wrong, why does everything work in codepen and gives NaN in wordpress?
Answer the question
In order to leave comments, you need to log in
$('input:checkbox:checked').each(function(){ ...
You need to specify better which input you are referring to, due to the fact that you have CF7 - your script takes into circulation all inputs from CF7 as well, hence the error.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question