move functions up one scope
This commit is contained in:
parent
62fc210f95
commit
986a0fcd16
|
@ -52,13 +52,13 @@
|
|||
<script src="https://cdn.jsdelivr.net/bootstrap.material-design/0.5.10/js/ripples.min.js" integrity="sha256-TY/EO/++Ug/P+fSBjaqlmtuphCBKwlP7TOnS+SGnN8g=" crossorigin="anonymous"></script>
|
||||
<script>
|
||||
$.material.init();
|
||||
|
||||
jQuery.each(jQuery('textarea[data-autoresize]'), function() {
|
||||
var offset = this.offsetHeight - this.clientHeight;
|
||||
|
||||
var resizeTextarea = function(el) {
|
||||
jQuery(el).css('height', 'auto').css('height', el.scrollHeight + offset);
|
||||
};
|
||||
|
||||
jQuery.each(jQuery('textarea[data-autoresize]'), function() {
|
||||
jQuery(this).on('keyup input', function() { resizeTextarea(this); });
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue