开发者

jQuery sortable programmatic manipulation

When you're dragging a jQuery sortable element, can you programmatically adjust the position of the element being dragged. I am trying to do this with the following code:

var currentPos = parseInt($(elementbeingdragged).css('left'));
$(elementbeingdragged).css('left',(currentPos-2)+'px');

However, I am getting some strange results. Is there a better API method call I can make to the sortable plugin to more reliably adjust the position of th开发者_开发百科e element being dragged?

Thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜