jQuery library include order causes error
I have a problem with jQuery UI Dialog - it is not closing when I click the X button.
I have detected that the problem goes away if I change the order of my javascript includes:
If I include files in the following order then the problem appears:
<script src="../../Scripts/jquery-1.6.4.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-1.8.7.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.validate.min.js" type="text/javascript"></script>
If I include files in the following order then the problem disappears:
<script src="../../Scripts/jquery.validate.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-1.6.4.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-1.8.7.min.js" type="text/javascript"></script>
This seems really strange - I thought that you should include the core jQuery stuff right at the top of the file? Presumably jquery.validate.min.js has dependencies upon the core jquery libs.
But, this issue would suggest that jquery.validate.min.js has some sort of conflict with the core?
Anyone know the best way of dealing with this?
Apologies that this may appear to be a dupe of jQuery UI Dialog will not close - I wanted to raise a new issue as it seems to be a slightly different problem to the one I o开发者_JAVA百科riginally raised.
Thanks very much.
精彩评论