1.  
  2. var handleMouseInContainer = function(e) {
  3. var topTop = topThumb.getTop();
  4. var topFront = topTop + topThumb.getHeight();
  5. var bottomFront = bottomThumb.getTop();
  6. var bottomBottom = bottomFront + bottomThumb.getHeight();
  7.  
  8. var y = e.getOffsetY();
  9. if (y >= topTop && y <= topFront) {
  10. _filterSlider.bottomSlider.setZIndex(1);
  11. _filterSlider.topSlider.setZIndex(100000);
  12. } else if (y >= bottomFront && y <= bottomBottom) {
  13. _filterSlider.bottomSlider.setZIndex(100000);
  14. _filterSlider.topSlider.setZIndex(1);
  15. }
  16. }
  17. ...
  18. this.sliderBody.addEventListener("mousedown", handleMouseInContainer);
  19. this.sliderBody.addEventListener("mousemove", handleMouseInContainer);
  20.  
  21.