title: How to Change position of cursor or position of scrollbar using jquery or javascript?
body: <p>I have used Android phonegap application for creating dynamic list with label and corresponding values for that label one by one (e.g. label: 'A', values: Arun, Amala, Aruna up to 'Z') and there are alphabets in side of the page.</p>
  
  <p>Now I want that when I am clicking alphabet ('A') the list automatically show the label ('A') with values, if it is 'B' show that label ('B') with values without modifying the list.</p>
  
  <p>While I am clicking 'A', how to get current position of label ('A') and move the cursor to that postion show the label ('A') with values?</p>
  
  <p>My code: I have retrive value from local database,below code is for dynamic list Script:</p>
  
  <pre><code>function querySuccess(tx,results)
  {
  
  
   $('.sidemenu').append("&lt;label style='background-color:#C1CDD9'   align='left'&gt;"+results.rows.item(i).alphabet + "&lt;/label&gt;"+"&lt;br/&gt;");
  for (i = 0; i &lt; results.rows.length; i++) 
                  {
  
   $(".sidemenu").append("&lt;li  id='list' &gt;"+"&lt;a id='link'  href='#'&gt;" +results.rows.item(i).name +  "&lt;/a&gt;"+ "&lt;br/&gt;"+ "&lt;/li&gt;");
   }
  </code></pre>
  
  <p>html</p>
  
  <pre><code>&lt;ul class="sidemenu" &gt;&lt;/ul&gt;
  </code></pre>
  
  <p>My dynamiclist like:</p>
  
  <pre><code>label-A
  </code></pre>
  
  <p>Arun
  Aruna
  Amala
  label-B
  Bala
  bhuvana</p>