I am using knockout.js to display a list of employees. I have a single hidden modal markup on the page. When the \"details\" button for a single employees is clicked, I wa
I would create another observable that wraps the employee.
this.detailedEmployee = ko.observable({}),
var self = this;
this.showDetails = function(employee){
self.detailedEmployee(employee);
$("#dialog").dialog("show"); //or however your dialog works
}
Attach the click to showDetails
. Then you can just call applyBindings
on page load.