diff options
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/javascripts/effects.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/javascripts/effects.js b/actionpack/lib/action_view/helpers/javascripts/effects.js index 3abb0eed04..c1befe5397 100644 --- a/actionpack/lib/action_view/helpers/javascripts/effects.js +++ b/actionpack/lib/action_view/helpers/javascripts/effects.js @@ -86,9 +86,12 @@ Element.childrenWithClassName = function(element, className) { } Element.forceRerendering = function(element) { - var n = document.createTextNode(' '); - $(element).appendChild(n); - Element.remove(n); + try { + element = $(element); + var n = document.createTextNode(' '); + element.appendChild(n); + element.removeChild(n); + } catch(e) {} } Array.prototype.call = function() { |