page shows duplicates when back button pressed
Hi ,
I have a multi page application using jquery mobile ,like page1,page2,page3,page4.
Here page3 generates dynamical list which populates on basis of database and when list item is clicked ,it navigates to page4 using "$.mobile.changepage".
Until this step everything goes fine,but when i press back button in page4,on page3 listitems are doubled in number and getting added to the existing list.
I don't know what to do.Any help regarding this problem
- for(var i=0;i<result.length;i++){
-
- var li = $('<li/>').html(result[i]+' ').append('<br>'+'$'+price[i].resultSet[0].price);
-
- li.append($('<hr>'));
-
- $(#result).append(li);
- $('#result').listview('refresh');
-
- }