javascript - Jquery Mobile Panel Content not Styled -


i adding entire html markup in pagebeforecreate method in jqmobile. @ last append html empty page , use trigger('create') style entire markup properly.everything styled fine except panel comes out of area.i have tried using trigger.(updatelayout) method of panel no use. know there simple command missing couldn't figure out . looking someone's help

enter image description here

code:

$(document).on('pagebeforecreate', '#pageone', function(){                  var str = '<div data-role="panel" id="user-panel" data-display="overlay" data-                      swipe-close="false" >'+                     '<ul data-role="listview" id="list" data-theme="a">'           var str1=''            $.getjson( "url", function( data, status) {             $.each(data.category, function (key, value) {             if(value.id==2) str = str + '<li  ><a href = "index.html" id="'+value.id+'"                                     onclick="test(event)">'+value.name+'</a></li>'          else str = str + '<li  ><a href = "maincategory.html" id="'+value.id+'"                     onclick="test(event)">'+value.name+'</a></li>'              });       str = str + '</ul>'      str = str +'</div>'    //code  continued.....and @ last     $(str).appendto( "#pageone" ).enhancewithin();          $("#pageone").trigger("create");   $("#list").listview().listview('refresh');   $("#list").listview('refresh');   $('[data-role=panel]').trigger( "updatelayout" ); 

ps: when generated markup in console , open html page panel fine means there problem dynamic addition


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -