开发者

Issue with "datepicker" widget (Jquery UI) in JSP page deployed on Tomcat 7

I am trying to use Jquery datepicker widget in my JSP page but I am getting an error like :

$("#dateOfPurchase").datepicker is not a function--(Indicated by Firebug)

where dateOf Purchase is an input Box type="text" . I have included the f开发者_如何学Pythonollowing files(combination used one combination at a particular time) for Jquery Inclusion:

<script  src="resources/scripts/jquery.ui.core.js"></script>
<script  src="resources/scripts/jquery.ui.datepicker.js"></script>
//---------------------------------------------------------------------------------
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js"></script>

But The datepicker isn't recognized.


Try loading the ui scripts after the basic jquery files. Also, make sure $("#dateOfPurchase").datepicker is inside a document.ready block


Actually I traced the problem to the double inclusion of Jquery..js file. Which I found out after trial and error and solved the problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜