I have created a function that recieve an id of an html element and adds a border to it's right side the function is general and just recieves an id so you can copy it as it is and it will work
var myoffset;_x000D_
function resizeE(elem){_x000D_
var borderDiv = document.createElement("div");_x000D_
borderDiv.className = "border";_x000D_
borderDiv.addEventListener("mousedown",myresize = function myrsize(e) {_x000D_
myoffset = e.clientX - (document.getElementById(elem).offsetLeft + parseInt(window.getComputedStyle(document.getElementById(elem)).getPropertyValue("width")));_x000D_
window.addEventListener("mouseup",mouseUp);_x000D_
document.addEventListener("mousemove",mouseMove = function mousMove(e) {_x000D_
document.getElementById(elem).style.width = `${e.clientX - myoffset - document.getElementById(elem).offsetLeft}px`;_x000D_
});_x000D_
});_x000D_
document.getElementById(elem).appendChild(borderDiv);_x000D_
}_x000D_
_x000D_
function mouseUp() {_x000D_
document.removeEventListener("mousemove", mouseMove);_x000D_
window.removeEventListener("mouseup",mouseUp);_x000D_
}_x000D_
_x000D_
function load() _x000D_
{_x000D_
resizeE("resizeableDiv");_x000D_
resizeE("anotherresizeableDiv");_x000D_
resizeE("anotherresizeableDiv1");_x000D_
}
_x000D_
.border {_x000D_
_x000D_
position: absolute;_x000D_
cursor: e-resize;_x000D_
width: 9px;_x000D_
right: -5px;_x000D_
top: 0;_x000D_
height: 100%;_x000D_
}_x000D_
_x000D_
#resizeableDiv {_x000D_
width: 30vw;_x000D_
height: 30vh;_x000D_
background-color: #84f4c6;_x000D_
position: relative;_x000D_
}_x000D_
#anotherresizeableDiv {_x000D_
width: 30vw;_x000D_
height: 30vh;_x000D_
background-color: #9394f4;_x000D_
position: relative;_x000D_
}_x000D_
#anotherresizeableDiv1 {_x000D_
width: 30vw;_x000D_
height: 30vh;_x000D_
background-color: #43f4f4;_x000D_
position: relative;_x000D_
}_x000D_
#anotherresizeableDiv1 .border{_x000D_
background-color: black;_x000D_
}_x000D_
#anotherresizeableDiv .border{_x000D_
width: 30px;_x000D_
right: -200px;_x000D_
background-color: green;_x000D_
}
_x000D_
<body onload="load()">_x000D_
_x000D_
<div id="resizeableDiv">change my size with the east border</div>_x000D_
<div id="anotherresizeableDiv1">with visible border</div>_x000D_
</body>_x000D_
<div id="anotherresizeableDiv">with editted outside border</div>_x000D_
</body>
_x000D_
resizeE("resizeableDiv"); //this calls a function that does the magic to the id inserted