【发布时间】:2009-08-27 02:49:13
【问题描述】:
我在购物车的 css div 上使用可拖动效果 (prototype+script.aculo.us)。我想在这个 div 中插入一个链接,允许用户在固定和绝对定位之间切换。 script.aculo.us 有什么简单的方法吗? (到目前为止我什么也没找到)
【问题讨论】:
标签: javascript css scriptaculous draggable
我在购物车的 css div 上使用可拖动效果 (prototype+script.aculo.us)。我想在这个 div 中插入一个链接,允许用户在固定和绝对定位之间切换。 script.aculo.us 有什么简单的方法吗? (到目前为止我什么也没找到)
【问题讨论】:
标签: javascript css scriptaculous draggable
您正在寻找的实际上并不是 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
【讨论】: