Warning: session_start(): open(/var/lib/php/sessions/sess_mnpv6v6v6odl3tsuu54lcuk1mb, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
// now needs JQuery
sS hjs_autoExpandingTextAreas() {
ret
hcss([[
textarea.auto-expand {
max-height: 10em; vertical-align: top;
}
]])
+ hjs([[
var autoExpandTextArea = function (field) {
field.style.height = "1px";
// Get the computed styles for the element
var computed = window.getComputedStyle(field);
var h = field.scrollHeight
+ parseInt(computed.getPropertyValue('border-top-width'))
+ parseInt(computed.getPropertyValue('border-bottom-width'));
field.style.height = h + 'px';
};
document.addEventListener('input', function (event) {
if (event.target.tagName.toLowerCase() !== 'textarea') return;
if (!event.target.classList.contains("auto-expand")) return;
autoExpandTextArea(event.target);
}, false);
$(document).ready(function() {
$("textarea.auto-expand").each(function() { autoExpandTextArea($(this)); });
});
]]);
}