const $ = require('jquery');

$(document).ready(function(){
  $('#splitter').mousedown(function(e){
    e.preventDefault();
    $(document).mousemove(function(e){
      $('.content').css("width",$(document).width()-e.pageX+2);
      $('.side-bar').css("width",e.pageX+2);
    })
  });
  $(document).mouseup(function(e){
    $(document).unbind('mousemove');
  });
});
const $ = require('jquery');

var splitterLocation;

$(document).ready(function(){
  $('#splitter').mousedown(function(e){
    e.preventDefault();
    $(document).mousemove(function(e){
      splitterLocation = e.pageX;
      $('.content').css("width", $(document).width() - splitterLocation);
      $('.side-bar').css("width", splitterLocation);
    })
  });
  $(document).mouseup(function(e){
    $(document).unbind('mousemove');
  });
});

$(window).resize(function() {
  if(typeof splitterLocation === "undefined") 
    return;
    
  $('.content').css("width", $(document).width() - splitterLocation);
});
Fix a bug that .content does not fit with the window (instead, blank area appears on the right side) when the window is resized.
Fix a bug that .content does not fit with the window (instead, blank area appears on the right side) when the window is resized.
