Biblioteca de JavaScript para el elemento de formulario Autodimensionamiento-elástico
| Autor: | LeaVerou |
|---|---|
| Views Total: | 1,715 |
| Sitio oficial: | Ir a la web |
| Actualizado: | July 30, 2018 |
| Licencia: | MIT |
Vista prévia
Descripción
Stretchy es una biblioteca de JavaScript ligera y de dependencia cero que ajusta automáticamente el tamaño de sus elementos de formulario (textareas, campos de entrada y casillas de selección) acordeón su contenido al escribir.
Funcionamiento
Sólo tiene que incluir la versión minimizada de elástico en su documento y hecho.
<script src="stretchy.min.js" async></script>
Métodos públicos.
// Autosize one element based on its content. Stretchy.resize(element) // Apply Stretchy.resize() to a collection of elements, or all Stretchy is set to apply to, if no argument is provided. Stretchy.resizeAll(elements) // Can Stretchy be used on this particular element? (checks if element is in the DOM, if it's of the right type and if it matches the selector filter provided by data-stretchy-selector, if the attribute is set. Stretchy.resizes() // Set to false to temporarily disable Stretchy. Stretchy.active
Registro de cambios
07/30/2018
- Bugfix





