Why is this page text-only?

Results tagged “script.aculo.us” from Code Scene

Compressing Prototype and Script.aculo.us

 If you're doing web development these days there's a good chance you've used the Prototype and Script.aculo.us JavaScript libraries.  They're both excellent and free libraries which make time-consuming JavaScript tasks much much simpler.

The only problem with them is that they're not exactly small.  If you just want to add some simple scrolling or fading effects to a page, you're looking at adding 160KB of JavaScript files... ouch.

Enter Protoaculous, a version of the scripts combined and compressed to minimize load times.  The compressed version now adds only 39KB to your site.  If all you need is the Script.aculo.us effects library you could use a version which weighs in at only 27KB.

I used it on a site I recently built and everything seems to work great.  I highly recommend using this tactic to minimize the load times on your sites.

Download the Protopack zip file here

Side note:  A recent post of the WebDriven Blog alerted me to another option to solving this problem in Google's new AJAX library API.  With this, you can let Google host the prototype (or jQuery, mooTools, and dojo) libraries for you.  In theory since these scripts will be pulled from Google's ultra-fast servers, it should help speed up your load times as well.  I've yet to try this approach but would be interested in hearing from anyone who does.

Script.aculo.us Accordion and LightWindow

These days I spend more of my time in meetings and putting out fires than I do actually writing cool new bits of code, which is one of the reasons for the infrequent blog postings. Since I'm not writing as much code these days I can at least point out some of the cool work being done by other people.

Kevin Miller of Stickman Labs has provided two great components based on the script.aculo.us framework; Accordion and LightWindow.

Accordion is a great way to add collapsible panels where one panel closes as another one opens. This is a great way to organize pages which have lots of content, like a Frequently Asked Questions page or perhaps organizing some navigation elements on a page.

LightWindow is similar to Lightbox and other modal/pop-over window controls. It uses AJAX to pull content from the server dynamically and display it overlayed on top of the current page. What differentiates it from the rest is that it supports virtually any kind of conent. You can use it to load images, flash movies, video files, other HTML content, web forms, etc. It's easy to setup and there are lots of options you can tweak to make it work for your site.

Both controls can add cool functionality to your site and they're incredibly easy to install and use. Check them out and start enhancing your applications.

Lastly, people like Mr. Miller dedicate a lot of time creating projects like this for the rest of us to use. While he offers these free of charge, please consider supporting him and the community in general by making a donation. Hopefully this will encourage him to keep creating great work like this.