<script type="text/javascript" src="//cdn.jsdelivr.net/gh/arunskrish/jsplitter@1.4.0/jsplitter.min.js"></script>
With flex based design
<div style="display:flex;">
<div id='leftDiv' class="p-2"> This is the left box.</div>
<div id='splitDiv' style="width:5px; background-color:gray;"></div>
<div id='rightDiv' class="p-2">This is the right box</div>
</div>
<script>
$('#splitDiv').jSplitter({
'leftdiv': 'leftDiv',
'rightdiv': 'rightDiv',
'flex': true
})
</script>
With fixed/margin-left based design-
<div class="wrapper">
<!-- Sidebar -->
<nav id="sidebar">
<div class="sidebar-header p-3">
<h4>Bootstrap Sidebar</h4>
</div>
</nav>
<!-- Splitter -->
<div id="vsplitter"></div>
<!-- Page Content -->
<div id="content">
<h2>
Main content
</h2>
</div>
</div>
<script type="text/javascript">
$('#vsplitter').jSplitter({
'leftdiv': 'sidebar',
'rightdiv': 'content'
});
</script>