All Downloads are FREE. Search and download functionalities are using the official Maven repository.

resources.tools_javascript_autosize.js Maven / Gradle / Ivy

There is a newer version: 1.14.4
Show newest version
/*!
	Autosize v1.17.6 - 2013-08-27
	Automatically adjust textarea height based on user input.
	(c) 2013 Jack Moore - http://www.jacklmoore.com/autosize
	license: http://www.opensource.org/licenses/mit-license.php
*/
(function (factory) {
	if (typeof define === 'function' && define.amd) {
		// AMD. Register as an anonymous module.
		define(['jquery'], factory);
	} else {
		// Browser globals: jQuery or jQuery-like library, such as Zepto
		factory(window.jQuery || window.$);
	}
}(function ($) {
	var
	defaults = {
		className: 'autosizejs',
		append: '',
		callback: false,
		resizeDelay: 10
	},

	// border:0 is unnecessary, but avoids a bug in FireFox on OSX
	copy = '