OK, well, this has got to be something really dumb.
I've got a little JSP app. I want to add a date picker. I downloaded the jQuery UI bundle. If I point chrome at the index.html that it gives me as a demo, all is well. When I move the pieces into my webapp, not so good.
The chrome console shows two things:
- Resource interpreted as script but transferred with MIME type text/html.
- Uncaught TypeError: Object # has no method 'datepicker'
Obviously, the second is where the headache arrives. I do have a <div id='calendar'>.
<head>
<link rel="stylesheet" type="text/css" href="/css/harvest.css" />
<link type="text/css" href="/css/smoothness/jquery-ui-1.8.2.custom.css" rel="stylesheet" />
<title>Data Collection</title>
<script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.8.custom.min.js"></script>
<script type="text/javascript">
$(function(){
// Datepicker
$('#calendar').datepicker({
inline: true, altField: 'input#date', altFormat: 'yy-mm-dd'
});
});
</script>
</head>