When Text Enter in Textarea then show text in DIV.but Condition is that,i append mutiple DIV then type text in Textare.then show text only one DIV not Other DIV.
My Code :
<button data-bind="adds">ADD</button>
<div data-bind="foreach: items">
<div class="SpeechBubble" id="speechID" data-bind="attr: { class: 'SpeechBubble' }">
<div class="pointer bottom " id="pointer"></div>
<div class="txtspeech"></div>
</div>
</div>
var SpeechBubble = function () {
this.items = ko.observableArray();
this.adds = function (item) {
this.items.push(item);
}
}
ko.applyBindings(new SpeechBubble());
$('.speechttxt').keyup(function () {
var txt = $(this).val();
$('.txtspeech').html(txt);
});