Logo

Autosize Textarea Examples


             <div class="card card-custom">
              <div class="card-header">
               <h3 class="card-title">
                Autosize Textarea Examples
               </h3>
              </div>
              <!--begin::Form-->
              <form class="form">
               <div class="card-body">
                <div class="form-group row">
                 <label class="col-form-label text-right col-lg-3 col-sm-12">Basic Demo</label>
                 <div class="col-lg-4 col-md-9 col-sm-12">
                  <textarea class="form-control" id="kt_autosize_1" rows="3"></textarea>
                 </div>
                </div>
                <div class="form-group row">
                 <label class="col-form-label text-right col-lg-3 col-sm-12">Preset Value</label>
                 <div class="col-lg-4 col-md-9 col-sm-12">
                  <textarea class="form-control" id="kt_autosize_2" rows="3">A small, stand-alone script to automatically adjust textarea height</textarea>
                 </div>
                </div>
               </div>
               <div class="card-footer">
                <div class="row">
                 <div class="col-lg-9 ml-lg-auto">
                  <button type="reset" class="btn btn-success mr-2">Submit</button>
                  <button type="reset" class="btn btn-secondary">Cancel</button>
                 </div>
                </div>
               </div>
              </form>
              <!--end::Form-->
             </div>
            

            // Class definition

            var KTAutosize = function () {

             // Private functions
             var demos = function () {
              // basic demo
              var demo1 = $('#kt_autosize_1');
              var demo2 = $('#kt_autosize_2');

              autosize(demo1);

              autosize(demo2);
              autosize.update(demo2);
             }

             return {
              // public functions
              init: function() {
               demos();
              }
             };
            }();

            jQuery(document).ready(function() {
             KTAutosize.init();
            });
            

User Profile 12 messages

James Jones
Application Developer
Recent Notifications
Another purpose persuade Due in 2 Days
+28%
Would be to people Due in 2 Days
+50%
-27%
The best product Due in 2 Days
+8%

Select A Demo