how to fix 'jQuery is not defined' error in jquery library?

后端 未结 2 1524
野的像风
野的像风 2021-01-11 17:49

Rails fix: make sure <%= javascript_include_tag \"application\" %> is before any script loading so that jquery gets loaded first.

<
相关标签:
2条回答
  • 2021-01-11 18:06

    jQuery UI doesn't include the standard jQuery library by default. You'll need to add a <script> tag to include the standard jQuery library before including any plugins that use it.

    0 讨论(0)
  • 2021-01-11 18:10

    your

    <script type="text/javascript" src="jquery.js"></script> 
    

    needs to be called before jquery ui < script > tags.

    Should appear like this:

     <script type="text/javascript" src="jquery.js"></script> <-- put me here -->
     <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
     <script src="http://bainternet-js-cdn.googlecode.com/svn/trunk/js/jQuery%20BlockUI%20Plugin/2.39/jquery.blockUI.js"></script>
    
    0 讨论(0)
提交回复
热议问题