2012-08-22 24 views
2

我正在使用名爲Gridster的jquery插件。Gridster on_overlap_stop覆蓋

http://gridster.net/

當初始化我網我想設置一個回調然而collision.on_overlap_stop每次我將它設置該程序引發各種錯誤在gridster代碼。

有沒有其他人遇到這個問題?

代碼示例:

<script type="text/javascript"> 
    var gridster; 

    $(function(){ 

    gridster = $(".gridster ul").gridster({ 
     widget_margins: [10, 10], 
     widget_base_dimensions: [140, 140], 
     draggable: { 
      stop: function(event, ui) 
      { 
       //code... 
      } 
     }, 
     collision: 
     { 
      //this function doesn't seem to be called and when this function is set the page crashes. 
      on_overlap_stop: function(collider_data) 
      { 
       //code.... 
      } 
     }, 
    }).data('gridster'); 
    }); 
</script> 

回答

4

恰好碰到了同樣的問題。如果您想使用on_overlap_stopon_overlap_start,則需要爲它們提供。那樣沒有錯誤顯示。