I want to use jQuery Datepicker in my website. However when I use the same I get the following error. Uncaught TypeError: Object # has no method 'datepicker' I've googled on this for quite sometime. All of these say that the problem could be due to loading jquery twice. I have checked and this isn't the case. I load the jQuery scripts in the following way.
<script type="text/javascript" src="http://xxxx/wp-includes/js/jquery/jquery.js"></script>
<script type="text/javascript" src="http://xxxx/wp-includes/js/jquery/ui/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="http://xxxx/wp-includes/js/jquery/ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://xxxx/wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js"></script>
...
...
<input type="text" id="arrival-date-10">
<input type="text" id="departure-dat-14">
....
<script type="text/javascript">
jQuery(document).ready(function(){
$("#arrival-date-10").datepicker();
$("#departure-date-14").datepicker();
});
</script>
I get the error in line $("#arrival-date-10").datepicker();
Please can someone help me?
Partha
jQuery(document).ready(function($){instead? – m0r7if3r Feb 4 '12 at 20:05