Reputation: 7955
I want to use jQuery UI on my site. I downloaded custom build, but it didn't work. So I used "full" version from their site. It doesn't work either.
My only code is:
$('#gameRelease').datepicker();
And what I get is an error in console:
Uncaught TypeError: Cannot read property 'fadeIn' of undefined
What can I do?
-- edit --
Okay, this is getting quite weird.
Here's my full code (I cutted what's not important):
JS
(function($){})(window.jQuery);
$(document).ready(function() {
/* jQuery UI */
$('#gameRelease').datepicker();
})
HTML
<script src="/js/modernizr-1.7.min.js"></script>
<script src="//code.jquery.com/jquery-latest.min.js"></script>
<script src="/js/jquery-ui-1.9.1.custom.min.js"></script>
<script src="/js/script.js"></script>
Upvotes: 0
Views: 3382
Reputation: 495
The plugin Nivo Slider for WordPress (0.2) loads it's own jquery.effects.core.js
file, which also makes the datepicker throw the same error.
If disabling the plugin makes the datepickers work, then you have to edit the nivoslider4wp-show.php
file. Find the line with <script ... src=".../js/jquery.effects.core.js" ...
, and comment it out using HTML comments (<!-- ... -->
).
Upvotes: 0
Reputation: 7955
Silly problem. It turns out, that you have to load jQueryUI right after jQuery. And I loaded it later.
Upvotes: 2