My html slider is causing me some trouble
<div class="range-handle" style="left: 188.276px;">100,000</div>
Upon loading the page, I noticed that in Firebug it appears like this https://i.sstatic.net/Rgqvo.png
On the actual page, it looks like < 100,000 >
I am trying to capture when users click on either arrow (left or right).
document.querySelector('.range-handle', ':before').addEventListener('click', leftArrow)
document.querySelector('.range-handle', ':after').addEventListener('click', rightArrow)
This method works partially, as both actions are always executed regardless of which arrow is clicked. The before event is handled first followed by the after event.
Given the code above, how can I ensure only one event is executed depending on which arrow is clicked?