0

我正在使用带有 jquery-rails 2.0.2 和 jqtree-rails (0.1.5.0) 的 rails 3.2

包含的 javascript 文件在我的 html 页面中如下所示:

<script src="/assets/jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.alerts.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.clearing.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.cookie.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.dropdown.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.forms.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.joyride.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.magellan.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.orbit.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.placeholder.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.reveal.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.section.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.tooltips.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/foundation.topbar.js?body=1" type="text/javascript"></script>
<script src="/assets/foundation/index.js?body=1" type="text/javascript"></script>
<script src="/assets/tree.jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery-ui.js?body=1" type="text/javascript"></script>
<script src="/assets/active_admin/lib/namespace.js?body=1" type="text/javascript"></script>
<script src="/assets/active_admin/components/jquery.aa.checkbox-toggler.js?body=1" type="text/javascript"></script>
<script src="/assets/active_admin/components/jquery.aa.dropdown-menu.js?body=1" type="text/javascript"></script>
<script src="/assets/active_admin/components/jquery.aa.popover.js?body=1" type="text/javascript"></script>
<script src="/assets/active_admin/components/jquery.aa.table-checkbox-toggler.js?body=1" type="text/javascript"></script>
<script src="/assets/active_admin/pages/application.js?body=1" type="text/javascript"></script>
<script src="/assets/active_admin/pages/batch_actions.js?body=1" type="text/javascript">      </script>
<script src="/assets/active_admin/application.js?body=1" type="text/javascript"></script>
<script src="/assets/active_admin/base.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.ui.core.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.ui.widget.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.ui.tabs.js?body=1" type="text/javascript"></script>
<script src="/assets/active_admin.js?body=1" type="text/javascript"></script>
<script src="/assets/domains.js?body=1" type="text/javascript"></script>
<script src="/assets/guest_books.js?body=1" type="text/javascript"></script>
<script src="/assets/static_pages.js?body=1" type="text/javascript"></script>
<script src="/assets/users.js?body=1" type="text/javascript"></script>
<script src="/assets/application.js?body=1" type="text/javascript"></script>
</body>

我已经复制了 jqtree 网站上给出的第一个示例,但是我有这个 javascipt 错误:TypeError: Object [object Object] has no method 'getOwnPropertyNames'

如果有人知道如何解决它,那就太好了!谢谢

4

1 回答 1

0

解决方案是你升级 jquery。我正在使用旧版本。

使用最新版本的 jquery 一切正常。

于 2013-10-03T10:20:16.000 回答