Permalink
Browse files

Merge pull request #4 from Zoramite/settings

Adding a settings object to hold any settings for the plugin.
  • Loading branch information...
2 parents 6fd056d + 2fb967d commit eef098b743e50e9e5fe78ebddbb08429d6eaf458 @bgrins committed Nov 3, 2011
Showing with 8 additions and 4 deletions.
  1. +8 −4 expanding.js
View
@@ -1,5 +1,9 @@
(function ($) {
-
+ $.expandingTextarea = $.extend({
+ autoInitialize: true,
+ initialSelector: "textarea.expanding"
+ }, $.expandingTextarea || {});
+
var cloneCSSProperties = [
'lineHeight', 'textDecoration', 'letterSpacing',
'fontSize', 'fontFamily', 'fontStyle',
@@ -68,10 +72,10 @@
return this;
};
- $.fn.expandingTextarea.initialSelector = "textarea.expanding";
-
$(function () {
- $($.fn.expandingTextarea.initialSelector).expandingTextarea();
+ if ($.expandingTextarea.autoInitialize) {
+ $($.expandingTextarea.initialSelector).expandingTextarea();
+ }
});
})(jQuery);

0 comments on commit eef098b

Please sign in to comment.