Add page onload

This commit is contained in:
Eliot Whalan 2016-06-24 16:25:32 +10:00
parent a25fbd518a
commit 6919cb597b
No known key found for this signature in database
GPG Key ID: C0A42175139840D6
1 changed files with 3 additions and 2 deletions

View File

@ -53,6 +53,7 @@
<script> <script>
$.material.init(); $.material.init();
$( document ).ready(function() {
jQuery.each(jQuery('textarea[data-autoresize]'), function() { jQuery.each(jQuery('textarea[data-autoresize]'), function() {
var offset = this.offsetHeight - this.clientHeight; var offset = this.offsetHeight - this.clientHeight;
@ -60,7 +61,7 @@
jQuery(el).css('height', 'auto').css('height', el.scrollHeight + offset); jQuery(el).css('height', 'auto').css('height', el.scrollHeight + offset);
}; };
jQuery(this).on('keyup input', function() { resizeTextarea(this); }).removeAttr('data-autoresize'); jQuery(this).on('keyup input', function() { resizeTextarea(this); }).removeAttr('data-autoresize');
}); });});
</script> </script>
</body> </body>