title: How to display menu items from database using jquery and javascript
body: <p>Hi i'm writing a menu list with css jquery and javascript : i want to get the menu items from a database </p>
  
  <p>js code:</p>
  
  <pre><code>  var selectAllStatement = "SELECT * FROM Contacts";
             function  findAll(){
         var name;
       db.transaction(function(tx) {
      tx.executeSql(selectAllStatement, [], function(tx, result) {
      dataset = result.rows;
          for (var i = 0, item = null; i &lt; dataset.length; i++) {
            item = dataset.item(i);
            name = item['firstName'] }
                     });
                                    });
  
                } 
  </code></pre>
  
  <p>html file:</p>
  
  <pre><code>    &lt;section id="popupAccordeon" class="hide"&gt;
  
  &lt;div id="popup-bg"&gt;
  &lt;/div&gt;
  
       &lt;div id="popup-box"&gt;   
  
      &lt;ul class="niveau1"&gt;
          &lt;li&gt;&lt;a href=""&gt;  Players Name&lt;/a&gt;
                  &lt;ul class="niveau2"&gt;
  
          &lt;li&gt;&lt;a href="http://www.rankspirit.com"&gt; &lt;/a&gt;&lt;/li&gt; // this are items i want to get them from table Contacts
  
              &lt;/ul&gt;
  
    &lt;/section&gt;
  </code></pre>