Feb 212012
 February 21, 2012  Posted by at 8:41 am Uncategorized  Add comments

It seems to me that the longer it takes to solve a problem the easier the solution. I just spent half a day trying to figure out why a piece of jQuery code wouldnt work, and returned “Object #<>has no method ‘datepicker'”. Sometimes you just cant see the forrest for the trees.

In case you didn’t know, the order in which you reference a script does indeed matter, and I had totally forgotten that being so eager and all. Placing the jQuery script after the jQueryUI was what caused the problem, and just simply rearranging the order solved the problem. jQueryUI needs jQuery to run, and if it is placed before the jQuery file it can cause problems such as the one above.

  2 Responses to “The order of things:”Object has no method ‘datepicker'””

  1. Thank you for this reminder ” longer it takes to solve a problem the easier the solution.” Very when programming.

  2. Thanks a lot! Could have spent all day to figure it out.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



What is 15 + 3 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)