JSFiddle - React, Tailwind, and code Playground

by Paul Leech

HTML

<div id="A">
  <ul>
    <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>toggle</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;
}

JavaScript

$('button').toggle(

function() {
    $('#B').css('left', '0')
}, function() {
    $('#B').css('left', '200px')
})