$('.quote').live('click', function() {
var quote = "test";
$("#msg").append(quote).scrollTop($('#msg')[0].scrollHeight).focus();
});
This function just copies “test” to the textbox. Since it will be a multi-quote function I used the append() function. It works fine. Even when I focus on the textbox.
BUT when I type any characters in the textbox or break the line it no longer works. Any ideas?
msg – textbox
focus(); isn’t also working for some reason.
try:
jsfiddle