Jquery mobile style not getting applied during ajax -


am trying load section of page using ajax in jquery mobile , append dom. styles of jquery mobile not getting applied.checked , found out there should .trigger('create') method should called. but, adding empty space.

am doing below thing.

$.ajax({  url : pagename,  datatype : "html",  success : function(data) {   $("#score").html(data);   $("#score").trigger("create");  } }); 

is there wrong in this. please help.


it not seem work. below structure after listview inserted dom   <div id="newssection">    <ul data-role="listview">   <li class="load" data-icon="false">    <a id="newslink" rel="external" href="newsdetail.html">     <div class="ui-grid-a">abc</div>    </a>   </li>    <li class="load" data-icon="false">     <a id="newslink" rel="external" href="newsdetail.html">    <div class="ui-grid-a">abc</div> </a> </li> </ul> <div class="footercontainer"> </div> </div> 

credit goes @gajotres

use $('[data-role=lisview]').listview().listview('refresh').

$.ajax({  url : pagename,  datatype : "html",  success : function(data) {   $("#score").html(data);   $('[data-role=lisview]').listview().listview('refresh');  } }); 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -