0

The question is straightforward: How do I get the POSITION of a slider-handle since it is contained inside a slider?

Can I use the getBoundingClient also?

Do you use this to call the slider-handle?

.slider::-webkit-slider-thumb 

or

.slider::-moz-range-thumb

I want to do something like this:

var mySliderHandleCursor = document.getElementById('THE_ID_OF_MY_SLIDER_CURSOR');
mySliderHandleCursor.getXposition();
mySliderHandleCursor.getYposition();

I'm asking this because I want to place the highlighted image below the position of my slider-cursor, as illustrated: enter image description here

So my plan is to:

1. Get X of slider-cursor assign it to marker-image
2. Get Y of slider-cursor and assign it to marker-image +20px
ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56
  • 1
    May we see a [mcve] - for now we do not even know if your slider is a jQuery plugin, a jQuery UI thing or an HTML5 slider - at least show some HTML – mplungjan Nov 09 '18 at 07:12
  • 1
    Question is no clear. Add more info, or draw a schematic picture with your coordinates. May be you are searching for scrollX, or may be you are searching for offsetX – degr Nov 09 '18 at 07:13
  • Certainly looks like this could be used: https://stackoverflow.com/questions/46448994/get-the-offset-position-of-an-html5-range-slider-handle – mplungjan Nov 09 '18 at 07:16

0 Answers0