Add page onload
This commit is contained in:
parent
565a11a2aa
commit
21342848b1
|
@ -53,14 +53,15 @@
|
|||
<script>
|
||||
$.material.init();
|
||||
|
||||
jQuery.each(jQuery('textarea[data-autoresize]'), function() {
|
||||
$( document ).ready(function() {
|
||||
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(this).on('keyup input', function() { resizeTextarea(this); }).removeAttr('data-autoresize');
|
||||
});
|
||||
});});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue