JSFiddle - React, Tailwind, and code Playground

by Paul Leech

HTML

<div id="A">
  <ul class="nav">
    <li>
      <a href="test1.html">test1</a>
      <a href="test2.html">test2</a>
      <a href="test3.html">test3</a>
      <a href="test4.html">test4</a>
      <a href="test5.html">test5</a>
    </li>
  </ul>
</div>
<div id="B"><button>&lt;&lt;</button></div>

CSS

html, body {
    margin: 0;
    padding: 0;
    border: 0;
}
#A, #B {
    position: absolute;
}
#A {
    top: 0px;
    width: 200px;
    bottom: 0px;
    background:orange;
}
#B {
    top: 0px;
    left: 200px;
    right: 0;
    bottom: 0px;
    background:green;
}
ul.nav li { display:block;list-style:none;}

JavaScript

$('button').toggle(
  function() {
      $('#B').css('left', '0');
      $('#B button').text('>>');
  }, function() {
      $('#B').css('left', '200px');
      $('#B  button').text('<<');
});
$()