Sha256: b386067637d10fa276a1f8e1b12959e18da6dcae88ac590ce9bac5a31a62d96f
Contents?: true
Size: 855 Bytes
Versions: 5
Compression:
Stored size: 855 Bytes
Contents
/*! * textarea autosize v0.4.0 * https://github.com/javierjulio/textarea-autosize */ !function(t,e){function i(e){this.element=e,this.$element=t(e),this.init()}var n="textareaAutoSize",h="plugin_"+n,s=function(t){return t.replace(/\s/g,"").length>0};i.prototype={init:function(){var i=(this.$element.outerHeight(),parseInt(this.$element.css("paddingBottom"))+parseInt(this.$element.css("paddingTop")));s(this.element.value)&&this.$element.height(this.element.scrollHeight-i),this.$element.on("input keyup",function(){var n=t(e),h=n.scrollTop();t(this).height(0).height(this.scrollHeight-i),n.scrollTop(h)})}},t.fn[n]=function(e){return this.each(function(){t.data(this,h)||t.data(this,h,new i(this,e))}),this}}(jQuery,window,document); // textarea autosize default $(function () { 'use strict'; $('.textarea-autosize').textareaAutoSize(); });
Version data entries
5 entries across 5 versions & 1 rubygems