stickman’s accordian.js and prototype 1.6.0 not playing well together
yesterday i was having some issues with accordian.js and the latest greatest version of prototype. everything worked fine and dandy with prototype 1.5.1.1, but i was having problems with ‘too much recursion’ errors while using Effects.DropOut from scriptaculous’ effects.js. so… i decided to upgrade to prototype 1.6.0, and that’s when the accordian broke. :*(
turns out that prototype has made some changes that were not backwards compatible with the $H (hash) class. following a comment poster’s suggestion on stickman’s site, i removed all references to $H from accordian.js as well as all of the references to options.merge and changed to the following:
old:
var options = $H({height: ‘0px’});
options.merge({display: ‘none’});
new:
var options = {height: ‘0px’};
Object.extend(options, {display: ‘none’});
this seems to have resolved the issue.
Also to note is a change that was made in 1.6.0 for creating superclasses using Class.create(). Of course… this change is a bit more graceful, as it seems that the legacy way of doing this still works.






















Wikinomics: How Mass Collaboration Changes Everything
Adobe Flex 3: Training from the Source
Breaking Out of the Web Browser with Adobe AIR
December 16th, 2007 at 6:25 pm
I haven’t had much luck with this change. Would there be any chance you could post you changes somewhere?
December 16th, 2007 at 6:51 pm
Sure! Here you go:
http://www.jimrising.com/assets/code/js/accordion_fixed.js
December 31st, 2007 at 10:19 pm
Jim,
Thanks!!!!!! This was giving me a fit, and I had already developed a huge amount of work around the 1.6.
December 31st, 2007 at 11:49 pm
hey… no problem. glad it was useful!
July 28th, 2008 at 12:35 pm
Thanks,
Just stumbled on your post. It was very usefull.