Hi All,
The solution at hand is simple:
I am injecting html code via jQuery's ajax calls and Microsoft's MVC. This is what I did in the success function.
I am injecting the following snipped html into the div with the id results:
<div data-role="collapsible" data-collapsed="false" data-theme="c">
<h3 id="results-header">2010 Discovery 40X</h3>
Hello World!
</div>
The ajax call is as follows:
$.ajax({
type: 'POST',
cache: false,
url: '/find-rvs/ajax/',
data: payload,
success: function (data) {
var el = $('#result');
el.html(data);
el.find('div[data-role=collapsible]').collapsible({theme:'c',refresh:true});
}
});