Listview refresh after F5
Hello,
My script is ok but only when i refresh my page or when i put a alert into my code.
If i do not that, nothing is displayed.
My Javascript :
- $(document).ready(function(){
-
- var id_enseigne = $("#enseigne").val();
- var output = '';
- $.getJSON("portefeuille/magasin_load.php", {"enseigne": id_enseigne}, function(data){
-
- $.each(data, function(key, val) {
- output+= '<li><a href=\"?p=3&id='+val.pdv_id+'\"><h3>' + val.pdv_ville + '</h3><p>'+val.Adresse+'</p></a></li>';
- }); // Fin du each
-
- $('#listview').append(output);
- $('#listview').listview('refresh');
-
- }); // Fin du json
- }); // Fin Document ready
My HTML :
- <div data-role="content">
-
- <ul id="listview" data-role="listview" data-filter="true">
- <?php //echo $list_pdv; ?>
- </ul>
- </div>
-
Thnak you for your help and sorry for my english !