Javascript 未定义不是资产管道中的函数
我在渲染“layouts/lms_头”中加载breakn.js 但是我得到的未定义不是$window上的函数 我不知道我为什么会犯这个错误 我想我已经加载了jquery和breakpoints.js 我使用断点库http://xoxco.com/projects/code/breakpoints/example.html 布局图 application.js 欢迎光临Javascript 未定义不是资产管道中的函数,javascript,jquery,ruby-on-rails-4,asset-pipeline,Javascript,Jquery,Ruby On Rails 4,Asset Pipeline,我在渲染“layouts/lms_头”中加载breakn.js 但是我得到的未定义不是$window上的函数 我不知道我为什么会犯这个错误 我想我已经加载了jquery和breakpoints.js 我使用断点库http://xoxco.com/projects/code/breakpoints/example.html 布局图 application.js 欢迎光临 我想我已经加载了jquery和breakpoints.js-你不能打开浏览器控制台并确保它们是否加载了吗?是的,它们已经加载了,
我想我已经加载了jquery和breakpoints.js-你不能打开浏览器控制台并确保它们是否加载了吗?是的,它们已经加载了,但我不能确保在调用之前加载了。
!!!
%html
%head
%title BalanceCafe
= stylesheet_link_tag 'application', media: 'all'
= javascript_include_tag 'application'
= csrf_meta_tags
=render 'layouts/lms_header'
//= require jquery
//= require jquery_ujs
//= require_self
//= require welcome
$(document).ready(function() {
return $(function() {
$(window).bind("enterBreakpoint1024", function() {
$("#log").append("<p>Entering 1024 breakpoint</p>");
});
$(window).setBreakpoints();
});