【问题标题】:pin/unpin draggable div in scriptaculous在scriptaculous中固定/取消固定可拖动的div
【发布时间】:2009-08-27 02:49:13
【问题描述】:

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

【问题讨论】:

    标签: javascript css scriptaculous draggable


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2016-03-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-28
      • 1970-01-01
      • 2019-07-24
      • 2012-11-24
      • 1970-01-01
      相关资源
      最近更新 更多