Javascript 在scriptaculous中锁定/取消锁定可拖动分区

Javascript 在scriptaculous中锁定/取消锁定可拖动分区,javascript,css,scriptaculous,draggable,Javascript,Css,Scriptaculous,Draggable,我在购物车的css div上使用了可拖动的效果(prototype+script.aculo.us)。我想在这个div中插入一个链接,允许用户在固定和绝对定位之间切换。script.aculo.us有简单的方法吗?(到目前为止,我什么也没找到)您所寻找的实际上不是scriptaculous的一部分,而是原型的一部分。您要查找的代码将是以下代码之一: $('element').relativize(); // to make the element relatively positioned $(

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

您所寻找的实际上不是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