Getting uncaught ReferenceError: _ is not defined and Uncaught TypeError: undefined is not a function

1.9k views Asked by At

I'm getting these errors on my codes when displaying modal on my webpage. Based on my observation on the browser console, I'm suspecting that the jquery files are conflicting with each other. This two files are "js/jquery-1.11.0.js" and "razorflow.wrapper.min.js". I'm not very good at Jquery and CSS and keen to know how to fix this issue. Any help will be appreciated.

  • Uncaught ReferenceError: _ is not defined
  • Uncaught TypeError: undefined is not a function

    <head>
    
    <!-- Core CSS - Include with every page -->
    <link href="css/css/bootstrap.min.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">
    
    <!-- SB Admin CSS - Include with every page -->
    <link href="css/sb-admin.css" rel="stylesheet">
    
    <!-- razorflow  -->
    <link rel="stylesheet" href="razorflow_php/static/rf/css/razorflow.min.css"/>
    <script src="razorflow_php/static/rf/js/jquery.min.js" type="text/javascript"></script>
    <script src="razorflow_php/static/rf/js/razorflow.wrapper.min.js" type="text/javascript"></script>
    <script src="razorflow_php/static/rf/js/razorflow.devtools.min.js" type="text/javascript"></script>
    </head>
    
    <body>
    html codes here.
    
    
    
     <!-- Core Scripts - Include with every page -->
    <script src="js/jquery-1.11.0.js"></script>
    <script src="js/new/bootstrap.min.js"></script>
    </body>
    

Further information:

If I remove two lines - and . This file "razorflow_php/static/rf/js/razorflow.wrapper.min.js" will work, meaning that the modal will pop out when I click on the icon. I'm displaying a chart for my website.

1

There are 1 answers

0
Danny Cui On

I found that issue caused error was missing " _ " class " _.min([n,r]) " function. In order to tackle this issue, you could add the following js library as additional extension to add " _ " class in. Append it after razorflow js files.

<script src="http://underscorejs.org/underscore-min.js"></script>