Archive for 'Effects'

Easily Replace Prototype and Scriptaculous with JQuery

There is a very cool gem called jquery-rails which provides you one rails generator which will replace your Prototype and Scriptaculous JavaScript libraries with JQuery, within your Rails app. It will download JQuery and install it for you under your public/javascripts directory. I believe this gem only works with Rails 3. I’ve only tested it […]

Rails Draggable Element Example – Scriptaculous Effect

This is a simple example of how to create two separate draggable elements using Scriptaculous Effect draggable_element. Here is what the end result will look like. Each box will be draggable. So once done, you’ll be able to drag each section and each section will remain on the screen where you leave it: Include default […]

Scriptaculous Effect.BlindUp and Effect.BlindDown

Here is an example sample code which demonstrates how to use Scriptaculous’ Effect.BlindUp and Effect.BlindDown in your Rails application to show and hide a section of your HTML. For example, let’s assume you want to hide some details and only show them if the user wants to see those details. These details are placed in […]