示例1:
html scriptaculous sortable onUpdate: (html scriptaculous... etc).
html jQuery **new** sortable onStop: (html jQuery... etc).
示例2:
html scriptaculous effect id: helpId; toggleAppear.
(html jQuery id: helpId) slideToggle: 1 seconds.
jQuery和Scriptaculous的集成方式似乎类似。任何人都可以解释两者之间发生的设计变化及其对语法的影响(特别是在第二个例子中)?
答案 0 :(得分:4)
JQuery 有一个非常统一的调用模式,与Seaside的集成也是如此:
有可能同时对多个元素执行操作是非常强大的,也是JQuery的一个好处。有关更多详细信息和示例,请查看these slides。
另一方面, script.aculo.us 是一组不太通用且组织不均匀的UI工具。大多数script.aculo.us调用都需要一个DOM ID来标识要处理的元素。这最初可能更简单,但也不那么强大。