Simply JavaScript by Kevin Yank & Cameron Adams
Author:Kevin Yank & Cameron Adams [Yank, Kevin]
Language: eng
Format: epub, mobi
ISBN: 9780980285802
Publisher: SitePoint Pty. Ltd.
Published: 2007-08-16T04:00:00+00:00
We can do so by passing the ID string to Effect.Highlight :
new Effect.Highlight("introduction");
As soon as you make this call, the effect will be applied to the element, as shown in Figure 5.17.
Figure 5.17. Creating a yellow fade effect with script.aculo.us
Effect.Highlight also allows you to pass it a DOM node reference, so you could apply the effect to the paragraph like this:
new Effect.Highlight(document.getElementsByTagName("p")[0]);
Most of the effects in script.aculo.us have optional parameters that allow you to customize various aspects of the effect. These parameters are specified as properties inside an object literal, which itself is passed as an argument to the effect.
For instance, by default, Effect.Highlight fades the background from yellow to white, but it’s possible to specify the start color and the end color, so we could make a particularly lurid fade from red to blue like this:
new Effect.Highlight("introduction", {startcolor: "#FF0000", endcolor: "#0000FF"});
These optional parameters will differ from effect to effect, so you’ll have to read through the script.aculo.us documentation if you wish to customize a particular effect.
Most of the effects have a duration parameter, which lets you specify how quickly you want the effect to occur. This parameter is specified in seconds, so if you wanted a two-second, lurid red-blue fade, you’d include all these parameters:
scriptaculous_highlight.js (excerpt)
new Effect.Highlight("introduction", {startcolor: "#FF0000", endcolor: "#0000FF", duration: 2});
Download
Simply JavaScript by Kevin Yank & Cameron Adams.mobi
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hello! Python by Anthony Briggs(9916)
The Mikado Method by Ola Ellnestam Daniel Brolund(9779)
Dependency Injection in .NET by Mark Seemann(9340)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7782)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Svelte with Test-Driven Development by Daniel Irvine(7183)
Test-Driven Development with PHP 8 by Rainier Sarabia(6907)
Layered Design for Ruby on Rails Applications by Dementyev Vladimir;(6775)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(6534)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6419)
Web Development with Django by Ben Shaw Saurabh Badhwar(6241)
React Application Architecture for Production by Alan Alickovic(5965)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5807)
Kotlin in Action by Dmitry Jemerov(5066)
Audition by Ryu Murakami(4583)
Software Architecture for Web Developers by Mihaela Roxana Ghidersa(4459)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4317)
Accelerating Server-Side Development with Fastify by Manuel Spigolon Maksim Sinik & Matteo Collina(4308)
Functional Programming in JavaScript by Mantyla Dan(4038)
