JSFiddle - React, Tailwind, and code Playground
by avrelian
HTML
<div class='outer-el'>
<input type='text' class='jumping-el'>
</div>
CSS
div {
position: relative;
overflow: hidden;
width: 300px;
height: 30px;
}
input {
position: absolute;
left: 0;
top: 0;
width: 1000px;
}
JavaScript
var jumpingEl = $('.jumping-el')
jumpingEl.keyup(function() {
console.log(jumpingEl.offset().left);
});