Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function autosize(textarea) {
- $(textarea).height(1);
- $(textarea).height($(textarea).prop("scrollHeight"));
- }
- $(document).on("input", "textarea", function() {
- autosize(this);
- });
- $("textarea").each(function () {
- autosize(this);
- });
Add Comment
Please, Sign In to add comment