Chapter 4. Introducing script.aculo.us

简介:

Chapter 4. Introducing script.aculo.us

上一章大部分内容是关于使用RailshelperPrototype的结合。这章,我们来转移下注意力到script.aculo.us上来,Railshelper也使用script.aculo.us来提供绚丽的视觉效果过度和强大的拖拽功能。
Prototype script.aculo.us的关系是非常紧密的。他们都和Rails共同工作,他们有非常相似的代码风格和API。事实上现在的很多script.aculo.us都是Prototype的最初原型。不论这二者之间有什么紧密关系,这两个资源库具有不同的目标。Prototype是为了扩展JavaScript而设计的,它拥有JavaScript语言的核心部分所具有的特征,例如提供了便于实现数据结构、DOM交互、轻松的Ajax调用等方法。而script.aculo.us工作在一个更高的层次,更接近于应用程序和用户界面,提供建立在Prototype基础之上的方法。有些情况下,这些方法非常复杂但是实现起来只需要几行代码。
在这一章,我们会举些例子来讲述,所以下面在Rails应用中生成一个controller和一个action
script/generate controller chapter4 index
现在,我们来瞧瞧 script.aculo.us  最出名的视觉效果吧!




本文转自 fsjoy1983 51CTO博客,原文链接:http://blog.51cto.com/fsjoy/91481,如需转载请自行联系原作者
目录
相关文章
poi.openxml4j.exceptions.InvalidFormatException: Package should contain a content type part [M1.13]
poi.openxml4j.exceptions.InvalidFormatException: Package should contain a content type part [M1.13]
420 0
|
8月前
|
前端开发 图形学
Could you provide some examples of when Canvas or SVG would be the better choice for a web application?
Could you provide some examples of when Canvas or SVG would be the better choice for a web application
|
Android开发 Kotlin
No signature of method: build_dr75kj88i2pi195a6zalvt5yu.android() is applicable for argument types
No signature of method: build_dr75kj88i2pi195a6zalvt5yu.android() is applicable for argument types
361 0
JavaFX报错:Class FIFinderSyncExtensionHost is implemented in both
JavaFX报错:Class FIFinderSyncExtensionHost is implemented in both
87 0
|
Kotlin
Program type already present: org.intellij.lang.annotations.Flow\Program type already present: org.i
Program type already present: org.intellij.lang.annotations.Flow\Program type already present: org.i
132 0
Program type already present: org.intellij.lang.annotations.Flow\Program type already present: org.i
Unable to load class 'org.gradle.api.internal.component.Usage
Unable to load class 'org.gradle.api.internal.component.Usage
137 0
es6 basic intro
es6 basic intro
102 0
- Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>, as t
vue.js报错如下: - Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as , as they will not be parsed.
5664 1
|
Android开发 Spring
An internal error occurred during: "Building UI model". com/google/common/base/Function
版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用自由转载-保持署名-注明出处,谢谢。 https://blog.csdn.net/testcs_dn/article/details/78798610 ...
1574 0