pin / unpin draggable div in scriptaculous

时间:2009-08-27 02:49:13

标签: javascript css scriptaculous draggable

我在购物车的css div上使用了可拖动效果(prototype + script.aculo.us)。我想在这个div中插入一个链接,允许用户在固定和绝对定位之间切换。 script.aculo.us有没有简单的方法呢? (到目前为止我一无所获)

1 个答案:

答案 0 :(得分:0)

您正在寻找的内容实际上不是scriptaculous的一部分,而是原型的一部分。您正在寻找的代码将是其中之一:

$('element').relativize(); // to make the element relatively positioned
$('element').absolutize(); // to make the element absolutely positioned
$('element').setStyle({position:'fixed'}); // to make the element fixed