Uncaught ReferenceError: $ is not defined rails

前端 未结 7 2099
后悔当初
后悔当初 2021-01-11 11:08

I\'m trying to add Froala editor to my project.

Problem only on production server(on localhost it works fine) I\'m using rails 4.1.0 In gemfile i\'m have

<         


        
7条回答
  •  心在旅途
    2021-01-11 11:27

    How do you have the foundation added to the project?

    In app/assets/javascripts/aplication.js

    I had the same error

    $ is no defined

    and I resolved by reloading the foundation js this way:

    jQuery(document).ready(function($) {
    $(document).foundation();
    });
    

提交回复
热议问题