Sunday, March 31, 2013

jQuery Learnings : sequence of including script files is important


Sequence of js :
while putting the <script> tags for jQuery js files, keep in minds the hierarchy; e.g. ui should come after jquery.

The following will not work :

    <link href="jquery-1.10.2-ui.css" rel="stylesheet" type="text/css" />
    <script src="jquery-1.10.2-ui.js" type="text/javascript"></script>
    <script src="jquery-1.9.1.js" type="text/javascript"></script>


Whereas the following will work:

    <script src="jquery-1.9.1.js" type="text/javascript"></script>
    <link href="jquery-1.10.2-ui.css" rel="stylesheet" type="text/css" />
    <script src="jquery-1.10.2-ui.js" type="text/javascript"></script>




This also negates the earlier post that we need to preserve the file names exactly. (http://rschandrastechblog.blogspot.in/2013/03/learnings-of-jquery-basic-modal-dialog.html)There might have been another error earlier.

No comments:

Post a Comment