In a project written in ruby ​​on rails, a library is installed for jquery ui.

On the next script through the console, Google Chrome gives an error

Uncaught TypeError: jQuery (...). Datepicker is not a function

<script> jQuery(function() { jQuery('.birthday1').datepicker(); }); </script> 

Climbing on the Internet on the forums and talking with programmers, everyone says that this is from a script conflict. Somewhere, the same script or name conflict runs twice.

My question is the following. How and with what tools can you check where and what exactly conflicts? The project is very large, really understand where this script conflicts very difficult. Thanks in advance for your reply.

  • Make sure that the datepicker code (jquery-ui. [Min.] Js) is loaded on the page. - Igor
  • try ... thanks ... - Stefan Hansch
  • I assume that jquery is loaded on the page more than 1 time. You can see in Chrome in the Network tab uploaded files to the js page. Or search on the html page - Skywave
  • Yes. and there is. Thank you - Stefan Hansch

1 answer 1

The problem was related to the conflict of several jquery scripts. Through the chrome console showed a plug-in error. Removed duplicate and everything fell into place.