title: How can i move the list from left to right and right to left using javascript
body: <p>I had achieved the below UI with my HTML Code but I need to implement the functionality to move the 1,2,3 numbers from left to right and right to left. Can I know how to achieve this?</p>
  <pre><code>&lt;table&gt;
  &lt;tr style=&quot;min-height:34px;&quot;&gt;
  &lt;td&gt;
  &lt;button id=&quot;leftscroll&quot; class=&quot;mubut&quot;onclick=&quot;moveright()&quot;&gt;Left&lt;/button&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;ul class=&quot;nav&quot;&gt;
  &lt;li id=&quot;list_a&quot; class=&quot;myli&quot; onclick=&quot;displaySelect()&quot;&gt;1&lt;/li&gt;
  &lt;li id=&quot;list_b&quot; class=&quot;myli&quot; onclick=&quot;displaySelect()&quot;&gt;2&lt;/li&gt;
  &lt;li id=&quot;list_c&quot; class=&quot;myli&quot; onclick=&quot;displaySelect()&quot;&gt;3&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;button id=&quot;rightscroll&quot; class=&quot;mubut&quot;onclick=&quot;moveleft()&quot;&gt;Right&lt;/button&gt;
  &lt;/td&gt;
  &lt;/table&gt;
  </code></pre>
  <p>Javascript Functions which has to achieve the left to right and right to left functionality.</p>
  <pre><code>function moveleft(){
  }
  
  function moveright(){
  }
  
  function displaySelect(){
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/yh6Uk.png" rel="nofollow noreferrer">User Interface Screenshot which was achieved</a></p>