title: How to get scroll bar for dynamic list view in jquery / Javascript?
body: <p>I have one list view which will get values dynamically from DB. How can I set scroll bar for the list view, If it has more than 3 values int it? Is this possible ? How to do that..</p>
  
  <p>My code is as follows,</p>
  
  <p>HTML code:</p>
  
  <pre><code>&lt;ul data-role="listview" id="locationList" name="locationList" data-inset="true"&gt;
      &lt;li value="Select Location"&gt;Select Location&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I am getting values dynamically from DB with following code,</p>
  
  <pre><code>$("#select-choice").on('change', function(event) {
      $("#locationList").empty();
      var catg = this.value;
      var db = window.sqlitePlugin.openDatabase({name: "MYDB"});
      db.transaction(function (tx) {
          tx.executeSql("select Location from Locationlog WHERE Category = '"+catg+"';", [],     function (tx, res) {
              var optionheading = '&lt;li value="Select Location"&gt;Select Location&lt;/li&gt;';
              $("#locationList").append(optionheading);
              for (var i = 0; i &lt; res.rows.length; i++) {
                  var opt  = '&lt;li value="';
                  opt += res.rows.item(i).Location;
                  opt += '"&gt;';
                  opt += res.rows.item(i).Location;
                  opt += '&lt;/li&gt;';
                  $("#locationList").append(opt);
              }
              $("#locationList").listview('refresh');
           });
       });
   });
  </code></pre>