Iris Classon
Iris Classon - In Love with Code

The order of things:'Object has no method 'datepicker''

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 #«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.

Comments

Leave a comment below, or by email.
Mike
6/8/2013 11:03:20 AM
Thank you for this reminder  " longer it takes to solve a problem the easier the solution." Very when programming. 
Dan
8/2/2013 6:56:55 PM
Thanks a lot! Could have spent all day to figure it out. 


Last modified on 2012-02-21

comments powered by Disqus