Content behind header, after create dinamically a page (.trigger('create').)
Hi guys,
I have problems when i create a page using .trigger("create").
well,
When i change the page, i do a loading data, and i do a refresh in page.
But the problem is, sometimes the content stay behind the fixed header.
What is the correct way to use page.trigger("create")?
look my code:
- app.pages.to("#info_establishment");
- $("#info_establishment").html(EstablishmentView.info_template({establishment: establishment, backParams: backParams})); // using handlebars to render the things
- app.renderPanels(); // how i do full a refresh in page, i need reconstruct the panel.
- $("#info_establishment").trigger('create');
I need do anymore than use only .trigger("create")?
EDIT: Annexed a screenshot
EDIT: Sample page:
- <script id="lst_segments_tpl" type="text/x-handlebars-template">
- <div data-role="header" class="put-panel" data-position="fixed" data-tap-toggle="false">
- <h1>Segmentos</h1>
- <a href="#nav-panel" class="btn-panel" data-icon="bars">Menu</a>
- <a data-icon="back" class="cz-back ui-btn-right">Voltar</a>
- </div>
- <div role="main" class="ui-content jqm-content jqm-fullwidth">
- <div id="list-wrap">
- <ul id="ul-segments" data-inset="true" data-role="listview" class="ui-listview"></ul>
- </div>
- </div>
- </script>
-
- <script id="li_segments_tpl" type="text/x-handlebars-template">
- {{#.}}
- <li data-id="{{_id}}">
- <a class="vclick" href="#list_establishment/{{_id}}">
- {{public_name}}
- </a>
- </li>
- {{/.}}
- </script>
OBS: I create the markup page via javascript because i need a wrap to render tpl handlebars, and append to body.
Refresh functions only rewrite html in id of page.
All my pages is in index.html. There is any problem?
EDIT: Using: jQuery mobile 1.4.2 jQuery v2.0.3
sorry my english.
Thanks!