I get an Uncaught TypeError: Object [object Object] has no method 'datepicker' in my javascript here:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script> <script type='text/javascript'> $(function() { $("#birthday").datepicker({changeMonth: true}); }); </script>
Here's the birthday element I'm trying to add:
<li class="field"> <label for="birthday">Birthday</label> <div class="field"><input type="text" id="birthday" name="birthday" value="" class="" /></div> </li>
As you can see, I am including the jquery ui source just above where I am trying to use datepicker. I got the url from http://jqueryui.com/docs/Downloading_jQuery_UI , so I'm sure this is a valid url. I also tried downloading the file and linking it to a local copy, and I still have the same error. What else can I try?
EDIT:
I have a jquery library loaded with this: <script type="text/javascript" src="/includes/js/jquery-1.7.2.min.js"></script> and the <script type="text/javascript" src="/includes/js/jquery-1.7.2.min.js"></script> confirmed with this bit:
if (jQuery) { alert("jQuery library is loaded!"); }
jquery jquery-ui datepicker
jaimerump
source share