iT邦幫忙

0

jquery gridstackjs 的問題

  • 分享至 

  • xImage

請問一下
GridStack.init({ handle: '.grid-stack-item-content', draggable: { appendTo: 'parent' } });

var tb = "";

        var cellID = [ ["rf3","ki","lgt","tc2"],
                       ["hcld","cape","srh","td2"],
                       ["mcld","spd","dps","rh2"],
                       ["lcld","dir","dp972","slp"] ]
        tb += `<div class="main_table grid_stack">
                   ${(function generateCell() {
                       let rowstr = ``
                       $.each(cellID, function (idx, keyarr) {
                            //rowstr += `<div class="mt_row ">`
                            keyarr.map(function(cid) {
                                rowstr += `<div class="grid-stack-item" id="td_${cid}" gs-w="3"><div class="mt_cell grid-stack-item-content ${cid}" id="${cid}"></div></div>`
                            });
                            //rowstr += `</div>`
                       });

                       return rowstr
                   })()}
               </div>
chartAction.gsInit();

我已經call 了GridStack.init, 但最後grid 完全不能drag, drop, resize, 請問是什麼問題, 謝謝

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友回答

立即登入回答