나는 gridster.js를 좋아하지만 콜백을 사용하는 방법을 알 수 없습니다. 다음은 documentation 상태는 Gridster 구성 개체에 전달 될 수이러한 콜백은 구성 개체에 어떻게 맞습니까?
다음draggable.stop: function(event, ui){}
// A callback for when dragging stops.
내가 노력하고있어하지만 난 draggable.stop 라인에 오류 Uncaught SyntaxError: Unexpected token .
을 얻을 것입니다.
var gridster = $(".gridster ul").gridster({
widget_margins: [5, 5],
widget_base_dimensions: [90, 90],
draggable.stop: function(){console.log("drag completed")}
}).data('gridster');
올바른 구문은 무엇입니까?
잘 기술적으로는' "draggable.stop"이되어야 할것 : FUNC ...'. 하지만 당신은'draggable : {stop : function() {console.log ("drag completed"); }}' – Ian