Jquery mobile select box can work only once

Jquery mobile select box can work only once


this is my screenshot from my website.

Question: when i click  firstly number 1 select box, then this seclect box works. but when i firstly click number 2 box, then click the number 1 box, number 1 can bot be opened. 

i dont no what's wrong. I need your help

this is my coed as follows:

  1. <form action="" method="post">
  2. <div data-role="fieldcontain">
  3. <select  multiple="multiple" id="chFleets" data-native-menu="false" onchange="selected()">
  4. <option>Choose FZG by Problem</option>
  5. <option value="letzter Nachrichtenempfang">letzter Nachrichtenempfang</option>
  6. <option value="kein Kilometerstand">kein Kilometerstand</option>
  7. <option value="Softwareversion veraltet">Softwareversion veraltet (TP 1/2)</option>
  8. <option value="keine Fahrt">keine Fahrt</option>
  9. <option value="Softwareversion fehlt">Softwareversion fehlt</option>
  10. <option value="Unbekannte T&T Konfiguration">Unbekannte T&T Konfiguration</option>
  11. <option value="keine Position">keine Position</option>
  12. <option value="Fahrerbewertung unplausibel">Fahrerbewertung unplausibel</option>
  13. <option value="Softwareversion unbekannt">Softwareversion unbekannt</option>
  14. <option value="Fahrzeug in Fehlerstatus">Fahrzeug in Fehlerstatus</option>
  15. </select>
  16. </div>
  17. </form>
and the following code is about number 2 box (black box)
  1. function tabelWithDetails() {

  2. for (var i = 1; i < (parseFloat(liste[("problemLength" + (liste["kw"] - 1)) + "Prio" + liste["open_company_nr"]])) + 1; i++) {

  3. if (i == liste["openDetails"] || liste["openDetails"] == 0 || liste["closeDetails"] == 1) {

  4. if (i == (parseFloat(liste[("problemLength" + (liste["kw"] - 1)) + "Prio" + liste["open_company_nr"]]))) {
  5. storage.set("closeDetails", 0);
  6. }

  7. var datas = ("Prio" + liste["open_company_nr"] + "_data" + i);

  8. var dataSet = liste[datas];

  9. set = dataSet.split(";");

  10. $('<li >' + '<a id=' + i + ' onclick= "showDetails( $(this))">' + " <b>" + "FZG:" + " </b>" + set[1].replace(/=/g, "") + " <b>" + " FAHRZEUGTYP:" + " </b>" + set[4] + '</a></li>').appendTo('ul#nav');
  11. $('#nav').listview('refresh');
  12. }
  13. }

  14. }

this black box, u can click it, and then information will be coming out. when u click again, the box is closed. 

  1. function showDetails(i) {

  2. if (liste["openDetails"] == i.attr('id')) {
  3. console.log(liste["openDetails"] + " open details ");
  4. storage.set("openDetails", 0);
  5. //console.log(i.attr('id') + " id von i.attr() ")
  6. removeOldDetails(0);
  7. //loadDetails();
  8. //window.location.reload();
  9. } else {
  10. storage.set("openDetails", i.attr('id'));
  11. }
  12. removeOldDetails(0);

  13. var datas = ("Prio" + liste["open_company_nr"] + "_data" + i.attr('id'));
  14. var dataSet = liste[datas];
  15. set = dataSet.split(";");
  16. if (liste["openDetails"] != 0) {
  17. $('<li >' + '<b>Problem: </b> <dir>' + set[17] + '</dir> </li >').appendTo('ul#details');
  18. $('<li >' + 'Empfohlene Aktion: <dir>' + set[18] + '</dir> </li >').appendTo('ul#details');
  19. $('<li >' + 'Fahrernote: <dir>' + set[15] + '</dir> </li >').appendTo('ul#details');
  20. $('<li >' + 'Kilometerstand: <dir>' + set[16] + '</dir> </li >').appendTo('ul#details');
  21. $('<li >' + 'MSISDN:<dir>' + set[6] + '</dir> </li >').appendTo('ul#details');
  22. //$('#details').listview('refresh');
  23. }
  24. $('#details').listview('refresh');
  25. //removeOldDetails(0);


  26. //removeOldDetails(1);
  27. }