Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
Jquery textarea expand to fit content issue

I have function for auto resize textarea height, it works on init and keyup:

autoHeight: function () {
        function autoHeight_(element) {
          //  $(element).parents('.rowb').height(element.scrollHeight);
            return jQuery(element)
                .css({ "height": "auto", "overflow-y": "hidden" })
                .height(element.scrollHeight);
        }
        return this.each(function() {
            autoHeight_(this).on("input", function() {
                autoHeight_(this);
            });
        });
    }

It works, but problem is if I increase textarea height by mouse and then typo something it does't save prev height. How can i use autoheight only if content is bigger then textarea height?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda