HTML and CSS techniques to reduce your JavaScript
Just in case, in Sciter (<a href="https://sciter.com" rel="nofollow">https://sciter.com</a>) you can declare<p><pre><code>   div {
     behavior:check;
   }
   div:checked {
     color:red; 
   }
</code></pre>
and all divs will behave as checkboxes - will toggle :checked  flag on clicks.<p>Same way:<p><pre><code>   div {
     behavior:radio;
   }
   div:checked {
     color:red; 
   }
</code></pre>
Or even :<p><pre><code>   table > tbody { /* scrollable table body, behaves as <select>*/ 
     behavior:select;
     overflow-y: auto; 
   }

   table > tbody > tr:current { /*current "option" */
     color:red; 
   }
</code></pre>
Also you can put this in your markup:<p><pre><code>   <frameset cols="120px,*">
      <div>left</div>
      <div>right</div>
   </frameset>
</code></pre>
to have split view.<p>No script is required for all these.