The Viamentis Blog

Curious About Everything

The Viamentis Blog header image 2

Scriptaculous - a Javascript library

March 14th, 2008 · Posted by divya · No Comments

Scriptaculous is a Javascript library for providing Web 2.0 effects in web pages. Scriptaculous is built on top of the Prototype library(prototype.js).Effects provided by scriptaculous include Visual effects like Appear,Higlight, Shake etc of DOM elements. It also provides advanced functions like Slider, Drag & Drop and Autocomplete for text boxes.

A drop and drop shopping cart example can be see here

Scriptaculous can be downloaded from here

Download and link the scriptaculouos.js file to your html page. Using scriptaculous effects is very easy

Example:

Effect.Appear('element_id'); (element_id is the id of a DOM element)

Similar examples with demo can be seen here

Scriptaculous library by itself is simple, but Ruby on Rails makes it even simpler. Rails has wrappers around scriptacuolus methods.

Examples:
i :onclick => visual_effect(:highlight, 'msg', :duration => 1.0)

ii. <%= draggable_element 'idOne', :revert => true %>

Tags: ···

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment