繁体   English   中英

最佳就地:未捕获的TypeError:对象[object Object]的属性'jQuery'不是函数

[英]Best In Place : Uncaught TypeError: Property 'jQuery' of object [object Object] is not a function

我正在尝试根据我的一种观点实施最佳原地宝石。 但是,当我单击示例按钮时,什么也没有发生,Chrome浏览器会弹出错误-

更新您可以在此处查看示例->

https://fierce-meadow-1536.herokuapp.com/users/10/common_apps/6/edit

username: tester@tester.com
password: 123123

-

Uncaught TypeError: Property 'jQuery' of object [object Object] is not a function best_in_place.js?body=1:52
Uncaught TypeError: Property 'jQuery' of object [object Object] is not a function best_in_place.js?body=1:595

参考中的特定javascript(在#comment之上)->

  this.oldValue = this.isNil() ? "" : this.element.html();
    this.display_value = to_display;
    jQuery(this.activator).unbind("click", this.clickHandler);
    #Uncaught TypeError: Property 'jQuery' of object [object Object] is not a function 
    this.activateForm();
    this.element.trigger(jQuery.Event("best_in_place:activate"));
  },

这是我的Application.js文件-

//= require jquery
//= require jquery_ujs
//= require chosen-jquery
//= require jquery_nested_form
//= require best_in_place
//= require_tree .

我的观点 -

== best_in_place @common_app, :cover_letter, :path => user_common_app_path(@user,@common_app),  :type => :textarea

Users.js.coffee

jQuery ->
  $('.best_in_place').best_in_place()

怎么了?

我找不到修复程序,似乎该宝石上的活性下降了很多。

最终找到了适用于x-editable的rails适配--https: //github.com/werein/x-editable-rails

它是新的,所以请注意它,但是它运行良好,并且开发人员对此非常活跃。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM