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,如需转载请自行联系原作者
目录
相关文章
|
7月前
|
前端开发 图形学
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
03HUI -基础文本(hui-common-title)
03HUI -基础文本(hui-common-title)
59 0
|
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
339 0
Anaconda Navigator:could not find or load the QT platform plugin "window in"
Anaconda Navigator:could not find or load the QT platform plugin "window in"
250 0
Anaconda Navigator:could not find or load the QT platform plugin "window in"
|
Android开发
Failed to transform artifact 'butterknife-runtime.aar (com.jakewharton:butterknife-runtime:10.1.0)'
Failed to transform artifact 'butterknife-runtime.aar (com.jakewharton:butterknife-runtime:10.1.0)'
Could not find com.serenegiant:common:4.1.1
Could not find com.serenegiant:common:4.1.1
260 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
129 0
Program type already present: org.intellij.lang.annotations.Flow\Program type already present: org.i
- 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.
5658 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) 后,创建项目时遇到些问题。
2757 0

热门文章

最新文章