Script.aculo.us

Script.aculo.us

Infobox Software
name = script.aculo.us

developer = Thomas Fuchs
latest release version = 1.8.1
latest release date = release date|2008|01|03
genre = JavaScript toolkit
programming language = JavaScript
license = MIT License
website = http://script.aculo.us

script.aculo.us is a JavaScript library built on the Prototype JavaScript Framework, providing dynamic visual effects and user interface elements via the Document Object Model.

It is most notably included with Seaside and Ruby on Rails, but also provided separately to work with other web application frameworks and scripting languages.

script.aculo.us was extracted by Thomas Fuchs from his work on fluxiom, a web based digital asset management tool by the design company wollzelle. [http://ajaxian.com/archives/audible-ajax-episode-12-thomas-fuchs-of-scriptaculous Ajaxian » Audible Ajax Episode 12: Thomas Fuchs of Script.aculo.us ] ] It was first released to the public in June 2005.

Features

script.aculo.us extends the Prototype Javascript Framework by adding visual effects, user interface controls, and utilities.

Visual effects

There are five core effects script.aculo.us offers: Opacity, Scale, MoveBy, Highlight, and Parallel. Through these effects there are over 16 additional effects using combinations of the core effects out of the box. Programmers can also extend and make new effects.

Enabling an effect is a matter of assigning an element with an ID name and one line of code for the effect. Below is an example for the Effect.Fade effect applied to a DOM element with ID of 'id_of_element':

new Effect.Fade('id_of_element');

This will cause the target ID to fade in opacity and end by setting the CSS display property to none.

You can also modify various settings within the effect such as duration of the effect and range of the effect:

new Effect.Fade('id_of_element', { duration:2.0, from:0.0, to:0.8 });

This would fade the element, but stop when the effect is 80% complete (with an opacity of 20%).

Controls

Controls offers user interface elements including:

* Drag And Drop
** Draggables
** Droppables
** Sortables
** Slider
* Autocompletion
* In Place Editing

Builder

Builder allows the creation of DOM elements dynamically. Using the sample code below:

element = Builder.node('div',{id:'ghosttrain'}, [ Builder.node('div',{className:'controls',style:'font-size:11px'}, [ Builder.node('h1','Ghost Train'), "testtext", 2, 3, 4, Builder.node('ul', [ Builder.node('li',{className:'active', onclick:'test()'},'Record') ] ) ] )] );

Creates the following (without newlines):

Ghost Train

testtext234
  • Record

Usage

Incorporating script.aculo.us into a website requires copying all javascript files in a folder and the following lines inserted in the head of an HTML document:

These lines must be loaded first before any javascript requesting any Prototype or script.aculo.us functions. Once loaded, these functions can be called in any valid javascript location including script tags and event handlers.

An alternative to copying all javascript files and hosting them locally to a website, Google provides an [http://code.google.com/apis/ajaxlibs/ Ajax Libraries API] that provides both Prototype and script.aculo.us which can be accessed using the Ajax API or directly as above:

References

Related links

* Prototype JavaScript Framework

External links

* [http://script.aculo.us/ script.aculo.us homepage]
* [http://github.com/madrobby/scriptaculous/wikis script.aculo.us documentation wiki]
* [http://slash7.com/articles/2006/04/22/scriptaculous-cheat-sheet-1 script.aculo.us cheat sheet]
* http://www.siva2baba.com/#/scriptaculous


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Script.aculo.us — Entwickler: Thomas Fuchs Aktuelle Version: 1.8.2 (18. November 2008) Betriebssystem: plattformunabhängig Programmiersprache …   Deutsch Wikipedia

  • Script.aculo.us — Тип JavaScript библиотека Разработчик Thomas Fuchs …   Википедия

  • script.aculo.us — Тип JavaScript библиотека …   Википедия

  • Script.aculo.us — Desarrollador Thomas Fuchs script.aculo.us Información general Última versión estable 1.8.1 3 de enero …   Wikipedia Español

  • script.aculo.us — Entwickler Thomas Fuchs Aktuelle Version 1.9.0 (23. Dezember 2010) Betriebssystem plattformunabhängig Programmier­sprache JavaScript …   Deutsch Wikipedia

  • Java Script — JavaScript ist eine Skriptsprache, die hauptsächlich für das DOM Scripting in Web Browsern eingesetzt wird. Dabei ist unter JavaScript die Gesamtheit aus den Eigenschaften des Browsers (beziehungsweise Clients oder Scripting Hosts) sowie des… …   Deutsch Wikipedia

  • Scriptaculous — script.aculo.us Entwickler: Thomas Fuchs Aktuelle Version: 1.8.2 (18. November 2008) Betriebssystem: plattformunabhängig Programmiersprache …   Deutsch Wikipedia

  • Scriptaculous — script.aculo.us Тип библиотека Разработчик Thomas Fuchs ОС Кроссплатформенное ПО Версия 1.8.2 18 ноября, 2008 …   Википедия

  • Сравнение каркасов веб-приложений — Это сравнительная таблица фреймворков веб приложений. Содержание 1 Фреймворки 1.1 ASP.NET 1.2 C++ 1.3 ColdFusion Markup Language (CFML) …   Википедия

  • Comparison of JavaScript frameworks — Contents 1 Comparison of JavaScript frameworks 1.1 Rationale 1.2 Table of Javascript Frameworks 2 See also …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”