title: JQuery Mobile db success event not triggering function
body: <p>I am having a problem executing a success function within multiple success events, let me show you the code:</p>
  
  <pre><code>$("#beneficiarios").one("pagebeforeshow", function(){
  
      db.transaction( function(tx){ queryDBAll(tx, "Beneficiarios", 0, 10) }, onError ); //LOAD BENEFICIARIOS IN DB
  
      $("#btn-add-ben").click(function(){
          var nombres = $('#b_nombres').val();
          var apellidos = $('#b_apellidos').val();
          var dia = $('#b_dia').val();
          var mes = $('#b_mes').val();
          var año = $('#b_año').val();
          var fecha_nac = año+"-"+mes+"-"+dia;
  
          //ADD BENEFICIARIO TO DB
          db.transaction( function(tx){
              tx.executeSql("INSERT INTO Beneficiarios (nombres, apellidos, fecha_nac) VALUES ('"+nombres+"','"+apellidos+"','"+fecha_nac+"')",
              [],
              function(tx, results){
                  var benid = results.insertId;
                  $('#emptyBeneficiarios').remove();
                  $('#ul-beneficiarios').append(
              '&lt;li&gt;&lt;a href="#" id="view_ben_'+benid+'"&gt;'+nombres+' '+apellidos+'&lt;/a&gt;&lt;a href="#" id="del_ben_'+benid+'" data-position-to="window" data-icon="delete" class="itemDelete"&gt;Eliminar&lt;/a&gt;&lt;/li&gt;').listview('refresh');
                  $("#del_ben_"+benid).click(function(){
                      //PENDING: CONFIRM DIALOG
                      db.transaction( function(tx){
                      tx.executeSql("DELETE FROM Beneficiarios WHERE ID = "+benid),
                      [],
                      console.log(benid+" borrado con éxito!"),
                      onError
                      });
                  });
                  $("#view_ben_"+benid).click(function(){
                      db.transaction( function(tx){
                      tx.executeSql('SELECT * FROM Beneficiarios WHERE ID = '+benid),
                      [],
                      //SUCCESS ACTION! -- NOT WORKING
                      function(tx, results) {
                          $('#b_nombres').val(results.rows.item.nombres);
                          $('#b_apellidos').val();
                          $('#b_dia').val();
                          $('#b_mes').val();
                          $('#b_año').val();
                          console.log(benid+" shown successfully!") //IS NOT SHOWN AT ALL
                      }
                      console.log(benid+" mostrado shown successfully without function!") //SHOWN AS DESIRED
                      ,
                      onError
                      });
                  });
              },
              onError );
          },
          onError );
          });
  
      $( "#ul-beneficiarios" ).delegate( "li a", "click", function() {
          $(this).parent("li").remove();
          var li_num = $('#ul-beneficiarios li').length;
          if (li_num == 1) {
              addEmptyBeneficiarios('#ul-beneficiarios');
          }
          } );
  });
  </code></pre>
  
  <p>As you can imagine I have an UL with LI that gets added when the ADD button is clicked, everything works fine, including the DB executions.</p>
  
  <p>The problem is when I click the $("#view_ben_"+benid) it does run properly, but it doesn't execute the SELECT success function properly although it does show a the console.log set outside the success function. Anyone has any ideas?</p>