简体   繁体   English

gridstack.js的''defaults'未定义'

[英]gridstack.js `'defaults' of undefined`

Im trying to follow the tutorial of gridstack.js ( here ) 我正在尝试遵循gridstack.js的教程( 此处

im literally copy and pasting the example to my code. 我将字面上的示例复制并粘贴到我的代码中。 but I get this Error 但我得到这个错误

在此处输入图片说明

and this is the list of library I load from cdnjs 这是我从cdnjs加载的库的列表

在此处输入图片说明

and this is my code : 这是我的代码:

<div class="grid-stack">
    <div class="grid-stack-item"
        data-gs-x="0" data-gs-y="0"
        data-gs-width="4" data-gs-height="2">
            <div class="grid-stack-item-content"></div>
    </div>
    <div class="grid-stack-item"
        data-gs-x="4" data-gs-y="0"
        data-gs-width="4" data-gs-height="4">
            <div class="grid-stack-item-content"></div>
    </div>
</div>

<script type="text/javascript">
$(function () {
    $('.grid-stack').gridstack();
});
</script>

Please change jQuery version to be 1.11.1 it seems the 3.3.1 not compatible with grid stack please check this demo https://github.com/gridstack/gridstack.js/blob/develop/demo/rtl.html 请更改jQuery版本为1.11.1,看来3.3.1与网格堆栈不兼容,请检查此演示https://github.com/gridstack/gridstack.js/blob/develop/demo/rtl.html

https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js

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

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