I have a text input where I get the input and use it. I have:
$(myinput).on('input', function() {
$(somediv).append($(this).val());
});
I would like to keep using the append function, but the problem is on every input, the entire input val() is being appended. So when I click 'a', its adding 'a', but when I click 'b' after a, it appends 'ab' not 'b'.
is there a way to only get the input of the most recent .input event without clearing out the input box?
.append, but you don't want to append?$(somediv).text();instead of append, but that was screwing up some other html I had inside the div<span id = "replaceable"></span>) for the replaceable content. Then you freely use$("#replaceable").text("your text"), if you want to do it this way I can post an answer.