I am trying to add text in the the <textarea>
when an on change event occurs.
It works perfectly fine in the first change event. But when I delete the text inside the text area and preform another change event it does not work add the text anymore?
I am really confused on why its not working. Below is a snippet of what I am trying to accomplish.
$("#test").on("change", function() {
$("#textarea_test").text("Hello");
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<select name="test" id="test">
<option value="Test1">Test 1</option>
<option value="Test2">Test 2</option>
</select>
<textarea name="textarea_test" id="textarea_test" cols="30" rows="10"></textarea>