简体   繁体   中英

gridstack.js `'defaults' of undefined`

Im trying to follow the tutorial of gridstack.js ( here )

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

在此处输入图片说明

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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