diff options
-rw-r--r-- | actionpack/lib/action_view/helpers/javascripts/effects.js | 7 | ||||
-rw-r--r-- | railties/html/javascripts/effects.js | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/javascripts/effects.js b/actionpack/lib/action_view/helpers/javascripts/effects.js index 432355b5d6..3b02eda2b2 100644 --- a/actionpack/lib/action_view/helpers/javascripts/effects.js +++ b/actionpack/lib/action_view/helpers/javascripts/effects.js @@ -1068,8 +1068,13 @@ String.prototype.parseStyle = function(){ return result; }; +Element.morph = function(element, style) { + new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || {})); + return element; +}; + ['setOpacity','getOpacity','getInlineOpacity','forceRerendering','setContentZoom', - 'collectTextNodes','collectTextNodesIgnoreClass'].each( + 'collectTextNodes','collectTextNodesIgnoreClass','morph'].each( function(f) { Element.Methods[f] = Element[f]; } ); diff --git a/railties/html/javascripts/effects.js b/railties/html/javascripts/effects.js index 432355b5d6..3b02eda2b2 100644 --- a/railties/html/javascripts/effects.js +++ b/railties/html/javascripts/effects.js @@ -1068,8 +1068,13 @@ String.prototype.parseStyle = function(){ return result; }; +Element.morph = function(element, style) { + new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || {})); + return element; +}; + ['setOpacity','getOpacity','getInlineOpacity','forceRerendering','setContentZoom', - 'collectTextNodes','collectTextNodesIgnoreClass'].each( + 'collectTextNodes','collectTextNodesIgnoreClass','morph'].each( function(f) { Element.Methods[f] = Element[f]; } ); |