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,如需转载请自行联系原作者
目录
相关文章
|
6月前
|
前端开发 图形学
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
Fullpage.js version 3 has changed its license to GPLv3 and it requires a `licenseKey` option ...
Fullpage.js version 3 has changed its license to GPLv3 and it requires a `licenseKey` option ...
140 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
124 0
Program type already present: org.intellij.lang.annotations.Flow\Program type already present: org.i
|
Android开发 iOS开发
where is os type and version determined for a ui5 html
Created by Jerry Wang, last modified on Jun 27, 2015
where is os type and version determined for a ui5 html
- 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.
5639 1
|
Android开发 Spring
An internal error occurred during: &quot;Building UI model&quot;. com/google/common/base/Function
An internal error occurred during: "Building UI model". com/google/common/base/FunctionEclipse Neon.2 Release (4.6.2) 安装了 STS(Spring Tool Suite) 后,创建项目时遇到些问题。
2754 0