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:
- <form action="" method="post">
- <div data-role="fieldcontain">
- <select multiple="multiple" id="chFleets" data-native-menu="false" onchange="selected()">
- <option>Choose FZG by Problem</option>
- <option value="letzter Nachrichtenempfang">letzter Nachrichtenempfang</option>
- <option value="kein Kilometerstand">kein Kilometerstand</option>
- <option value="Softwareversion veraltet">Softwareversion veraltet (TP 1/2)</option>
- <option value="keine Fahrt">keine Fahrt</option>
- <option value="Softwareversion fehlt">Softwareversion fehlt</option>
- <option value="Unbekannte T&T Konfiguration">Unbekannte T&T Konfiguration</option>
- <option value="keine Position">keine Position</option>
- <option value="Fahrerbewertung unplausibel">Fahrerbewertung unplausibel</option>
- <option value="Softwareversion unbekannt">Softwareversion unbekannt</option>
- <option value="Fahrzeug in Fehlerstatus">Fahrzeug in Fehlerstatus</option>
- </select>
- </div>
- </form>
and the following code is about number 2 box (black box)
- function tabelWithDetails() {
- for (var i = 1; i < (parseFloat(liste[("problemLength" + (liste["kw"] - 1)) + "Prio" + liste["open_company_nr"]])) + 1; i++) {
- if (i == liste["openDetails"] || liste["openDetails"] == 0 || liste["closeDetails"] == 1) {
- if (i == (parseFloat(liste[("problemLength" + (liste["kw"] - 1)) + "Prio" + liste["open_company_nr"]]))) {
- storage.set("closeDetails", 0);
- }
- var datas = ("Prio" + liste["open_company_nr"] + "_data" + i);
- var dataSet = liste[datas];
- set = dataSet.split(";");
- $('<li >' + '<a id=' + i + ' onclick= "showDetails( $(this))">' + " <b>" + "FZG:" + " </b>" + set[1].replace(/=/g, "") + " <b>" + " FAHRZEUGTYP:" + " </b>" + set[4] + '</a></li>').appendTo('ul#nav');
- $('#nav').listview('refresh');
- }
- }
- }
this black box, u can click it, and then information will be coming out. when u click again, the box is closed.
- function showDetails(i) {
-
- if (liste["openDetails"] == i.attr('id')) {
- console.log(liste["openDetails"] + " open details ");
- storage.set("openDetails", 0);
- //console.log(i.attr('id') + " id von i.attr() ")
- removeOldDetails(0);
- //loadDetails();
- //window.location.reload();
- } else {
- storage.set("openDetails", i.attr('id'));
- }
- removeOldDetails(0);
- var datas = ("Prio" + liste["open_company_nr"] + "_data" + i.attr('id'));
- var dataSet = liste[datas];
- set = dataSet.split(";");
- if (liste["openDetails"] != 0) {
- $('<li >' + '<b>Problem: </b> <dir>' + set[17] + '</dir> </li >').appendTo('ul#details');
- $('<li >' + 'Empfohlene Aktion: <dir>' + set[18] + '</dir> </li >').appendTo('ul#details');
- $('<li >' + 'Fahrernote: <dir>' + set[15] + '</dir> </li >').appendTo('ul#details');
- $('<li >' + 'Kilometerstand: <dir>' + set[16] + '</dir> </li >').appendTo('ul#details');
- $('<li >' + 'MSISDN:<dir>' + set[6] + '</dir> </li >').appendTo('ul#details');
- //$('#details').listview('refresh');
- }
- $('#details').listview('refresh');
-
-
- //removeOldDetails(0);
-
- //removeOldDetails(1);
- }