I am trying to implement country search in my dummy application. Initially on home page i am using list view and it is displaying properly. But the same list view, if i am displaying using ajax, List view content is displaying but css is not applied on this.
Please have a look at dummy application by clicking on link below:
http://questoons.com/vkwave/sof/ajaxrequest/
In dummy app, initially list view displaying properly but when click on “Call Ajax and Populate Country List”, i am sending the whole list data using ajax like below:
<ul data-role="listview" data-filter="true" data-filter-placeholder="Search Country/Group..." data-filter-theme="d" data-theme="d" data-divider-theme="b">
<li data-role="list-divider">A</li>
<li data-icon="false"><a href="#" >Afghanistan</a></li>
<li data-icon="false"><a href="#" >Argentina</a></li>
<li data-icon="false"><a href="#" >Australia</a></li>
<li data-icon="false"><a href="#" >Austria</a></li>
<li data-role="list-divider">B</li>
<li data-icon="false"><a href="#" >Bahamas, The</a></li>
<li data-icon="false"><a href="#" >Bahrain</a></li>
</ul>
but in ajax response list css is not applied. Please guide where i am wrong.
I am using normal jquery ajax.
in first load your Html is:
ul, li, and other html element has some class. but in ajax response you missing this class. Add css classes to your ajax response.
for example :