0

I work with dragscroll. In the draggable area will be a few range sliders. Currently, it is not possible to use this sliders, because dragscroll moves the area.

Is it possible to pause dragscroll while using the range sliders?

I startet to write this, but currently it does not work at all:

$( "input[type=range]" ).hover(function() {
$('.dragscroll').removeClass('dragscroll');
});

Hopefully someone can help me. :)

NEWS: I just tried to remove other classes and that worked perfectly. Why can't I remove the draggscroll class?

Elena1a1a
  • 21
  • 5

1 Answers1

0

Try using this patched version

https://github.com/ethaizone/dragscroll/tree/patch-2

.dragscroll {
  width: 270px;
  float: left;
  padding: 10px;
  overflow: auto;
}
<script src="https://rawcdn.githack.com/ethaizone/dragscroll/a0a014ef981ca8e04c207166be65142deffc9cf1/dragscroll.js" crossorigin="anonymous"></script>

<div class="dragscroll">
  <h3>Event horizon</h3>

  <pre>
    In general relativity, an event horizon is a boundary in spacetime beyond which events cannot affect an outside observer. In layman's terms, it is defined as "the point of no return", i.e., the point at which the gravitational pull becomes so great as
    to make escape impossible. An event horizon is most commonly associated with black holes. Light emitted from beyond the event horizon can never reach the outside observer. Likewise, any object approaching the horizon from the observer's side appears
    to slow down and never quite pass through the horizon, with its image becoming more and more redshifted as time elapses. The traveling object, however, experiences no strange effects and does, in fact, pass through the horizon in a finite amount of
    proper time.
  </pre>

  <div>
    <input type="range" min="0" max="100" value="30" />
  </div>

</div>

Reference https://github.com/asvd/dragscroll/issues/47

User863
  • 19,346
  • 2
  • 17
  • 41