JS/jQuery TypeError: jQuery(...).datepicker is not a function
The are several reasons for this error:
- The jquery.ui is used before jquery.
- The $ is used by another library.
- The jquery lib that is referenced locally(wordpress) has different version from that using jquery.ui.
- When the right library and version is referenced the browser cache must be cleared.
I was having the same problem. In my case I had two jQuery script references on my main page (_Layout.cshtml
in ASP.NET MVC). I added 1 reference to jQuery at the top but there was 1 at the bottom of the page that I didn't notice... In Firebug this is what I saw:
So as you can see, jQuery UI was sitting in the middle of the conflict! :D This took me some time to figure out.
check if all files are loaded.Should have 200 ok status.