我有一个可拖动的元素,它会触发应用程序中某个组件的大小调整。我想使用underscore.js或jquery插件来限制this.dragAdjust( ui.offset );。问题是我不确定如何传递参数,ui.offset。
var self = this;
$("#hs-resizer").draggable( {
axis: "y",
containment: "parent"//,
//drag: function( event, ui ) {
// self.dragAdjust( ui.offset );
//}
});
$("#hs-resizer").drag( _.throttle( self.dragAdjust, 500 ) );发布于 2014-10-12 12:59:32
尝试:
$("#hs-resizer").draggable( {
axis: "y",
containment: "parent",
drag: _.throttle(self.dragAdjust, 500 )
});https://stackoverflow.com/questions/26312001
复制相似问题