I am using knockout foreach binding to bind a div. But when i click the button a new model does not get created and model keep expanding continously.I want my data should be binded only once not again and again.What wrong i am doing. Here is Here is a demo of problem
function bindValues() {
var obj1 = { Name: ko.observable("location & size") };
var obj2 = { Name: ko.observable("font") };
var obj3 = { Name: ko.observable("border lines + fills") };
var obj4 = { Name: ko.observable("alignment + padding") };
var model = new Object({
Styles: ko.observableArray()
});
model.Styles.push(obj1);
model.Styles.push(obj2);
model.Styles.push(obj3);
model.Styles.push(obj4);
ko.applyBindings(model, document.getElementById("style-accordion"));
}