When adding custom behavior to your application, modifying the existing script.aculo.us javascript files can leave you in a bind. As new features are added and bugs are fixed, you’ll need to modify the library files with each release.
However, there is a better way – extending script.aculo.us without modifying the source code is easy as of the release of version 1.5_pre4.
this.require(path + 'extensions.js');
(includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each(
function(include) { Scriptaculous.require(path+include+'.js') });
<script type="text/javascript" src="scriptaculous/scriptaculous.js?load=effects,dragdrop,extensions">when calling your script.
/* when finished, don't jump back to the top of the page.
*/
Object.extend(Element, {
show: function() {
for (var i = 0; i < arguments.length; i++) {
var element = $(arguments[i]);
element.style.display = '';
} // end for
}})
When you checkout the next release of script.aculo.us, simply repeat step 2.