- Fx.TweenDelta = new Class({
- Extends: Fx.Tween,
- prepare: function(element, property, delta){
- var values = [];
- values[0] = element.getStyle(property);
- var from = this.parse(values[0]);
- // if( from.parser != Fx.CSS.Parsers.Number ) return; //cant handle anything but numbers
- values[1] = from[0].value + Number(delta[0]);
- var parsed = values.map(this.parse);
- return {from: parsed[0], to: parsed[1]};
- },
- });
I'm fairly new to Mootools, and new to this forum, so forgive me if I'm bringing up old news.
In learning to animate various elements using Mootools, I came across this script to make various animation techniques even easier than they are already. For me it made some of my projects much less of a brain twister than they could have been, and allowed me to do some fairly sexy looking work with litterally NO knowledge of Mootools.
You can find the "Shakes! Animations Plugin for Mootools", and a summary of it's functionality here: http://ayurweba.dinamis.com/projects/shakes/
The reason I want to post, is that I have found a major issue within the "shakes.js" file which causes a serious error in IE7 and literally stops ALL mootools code from functioning in IE7. IE8, Firefox, etc will work fine, and allow Mootools code to run without issue. I have managed to fix the .js file, and felt that I should post this to the forum, as I have tried to contact the original author of the script, but without success. I imagine there are thousands of people who find this script useful, and I imagine many of them will abandon the script when they realise the IE7 issue.
YOU DO NOT HAVE TO ABANDON THIS AWESOME LIBRARY! THERE IS A VERY VERY SIMPLE FIX!!!!!
The problem is caused by several out-of-place commas throughout the document, and can be fixed VERY easily.
For example, the first instance of a misplaced comma appears on line #11 of the shakes.js file, as shown below:
To fix the problem, open up the "shakes.js" file and simply delete these misplaced commas. Your scripts will now function as intended in all browsers, including IE7!!!! A list of the lines where commas appear in the wrong place can be found below:
- Line 11
- Line 19
- Line 263
- Line 312
I hope this is as helpful to the community as it has been to me, it's a great little library for beginners imo.



