Skip to content
Browse files

originalCss not actually needed (I think): Zoramite@a2fa0a0

  • Loading branch information...
1 parent 6f47856 commit 2453f7bd9009d510a72b4b340f88e9eba86a0ae7 @bgrins committed Nov 3, 2011
Showing with 3 additions and 11 deletions.
  1. +3 −11 expanding.js
View
14 expanding.js
@@ -51,9 +51,8 @@
textarea
.insertBefore(container)
- .css(textarea.data('originalCss') || {})
.attr('style', textarea.data('originalStyle') || '')
- .removeData('originalCss originalStyle');
+ .removeData('originalStyle');
container.remove();
});
@@ -64,22 +63,15 @@
this.filter("textarea").not(".expanding-init").each(function() {
var textarea = $(this).addClass("expanding-init");
- // Store the original styles for destroying
- textarea.data('originalStyle', textarea.attr('style'));
textarea.wrap("<div class='expandingText'></div>");
textarea.after("<pre class='textareaClone'><div></div></pre>");
var container = textarea.parent().css(containerCSS);
var pre = container.find("pre").css(preCSS);
- var originalCSS = {};
-
- $.each(textareaCSS, function(i, p) {
- originalCSS[i] = textarea.css(p);
- });
-
- textarea.data('originalCss', originalCSS);
+ // Store the original styles for destroying
+ textarea.data('originalStyle', textarea.attr('style'));
textarea.css(textareaCSS);

0 comments on commit 2453f7b

Please sign in to comment.
Something went wrong with that request. Please try again.