2010-07-21 86 views

回答

9

檢查出axis選項:

「約束拖動到所述水平(x)或垂直(Y)軸可能的值: 'X', 'Y'」。

例子:

// Initialize a draggable with the axis option specified. 
$(".selector").draggable({ axis: 'x' }); 

// Get the axis option, after initialization. 
var axis = $('.selector').draggable('option', 'axis'); 
// Set the axis option, after initialization. 
$('.selector').draggable('option', 'axis', 'x'); 
+0

謝謝你,它會幫助我 – milan 2010-07-21 04:01:21

相關問題