I\'ve got an application receiving some data through AJAX-call. After that, received data binds to DOM-elements using knockout.js library. I\'d like to use boostrap
Here is a complete working example with array of objects, I changed the ko.applyBindings()
to ko.applyBindingsToDescendants
to include the binding context $root and $parent when we would like to associate a button for example to a function in a root viewModel.
$(element).click(function() {
$(this).popover('toggle');
var thePopover = document.getElementById(attribute.id+"-popover");
childBindingContext = bindingContext.createChildContext(viewModel);
ko.applyBindingsToDescendants(childBindingContext, thePopover);
});
Take a look @ http://jsfiddle.net/mounir/Mv3nP/6/