Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Wordpress is giving me an odd console error from a datepicker script I enqueue-ed. I read over the other datepicker questions, but they didn't solve this because the datepicker is actually working. I am pretty sure I loaded everything the normal way, with the wp_enqueue_scripts() and using no conflict wrappers. The datepicker works well when it is present on the page, but when no datepicker is on the page it is causing conflicts with other scripts.

This is the error"Uncaught TypeError: Object [object Object] has no method 'datepicker' "

This is the heading to my script:

jQuery(document).ready(function() {
jQuery('.datepicker').datepicker({
}); });

Also, I noticed that on the jquery website it is #datepicker not .datepicker, but for some reason this is the way that works with gravity forms, could that be part of the problem some how? Any help or ideas with this is appreciated... I'm stuck.

share|improve this question
Ask pure HTML, CSS or JavaScript questions on Stack Overflow. – toscho Sep 20 '12 at 8:06

closed as off topic by kaiser, Brian Fegter, Wyck, toscho Sep 20 '12 at 8:06

Questions on WordPress Answers are expected to relate to WordPress within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.