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’s unobtrusive markup for creating popovers like this:
<table class="table table-condensed" data-bind="foreach: items">
<tr>
<td><b data-bind="text: $data.id"></b></td>
<td data-bind="text: $data.title"></td>
<td><a href="#" rel="popover" data-bind="attr: {title: $data.info}" data-placement="top">Info</a></td>
</tr>
</table>
According to the latest bootstrap documentation, implicit call of something like $('.popover').popover() isn’t required, however, it’s not working.
I suppose, that boostrap.js perform some DOM-analysis on document.ready and perform all needed work for popover to work. And the question: is there some way to tell bootstrap.js to perform similar job for data after receiving AJAX response? Or how this kind of requirements can be achieved?
You can create custom dataBinding to make that element popover. Check this jsfiddle demo
And html