Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to prioritize jQuery slider handle?
    primarykey
    data
    text
    <p>I have two slider handles with <code>&lt;span&gt;</code> appended to them. Meaning sliders can be controlled by attached span as well.</p> <p><img src="https://i.stack.imgur.com/hUxoF.png" alt="enter image description here"></p> <p>The code is as given:</p> <pre><code>//jquery code $('#slider').slider({ values: [0, 0] var handle1 = $('#slider a.ui-slider-handle, ui-state-default, ui-corner-all').first(); handle1.append('&lt;span class="sidecar"&gt;&lt;/span&gt;'); var handle2 = handle1.next(); handle2.append('&lt;span class="sidecar2"&gt;&lt;/span&gt;'); } //css code .sidecar { position: absolute; top: 50px; left: 0; width: 20px; height: 20px; background: #f00; } .sidecar2 { position: absolute; top: 80px; left: 0; width: 20px; height: 20px; background: #000000; } </code></pre> <p><img src="https://i.stack.imgur.com/OgV8S.png" alt="enter image description here"></p> <p>When they are on top of each other(e.g. at (0,0)), even if I try to drag the handle attached with the <code>&lt;span&gt;</code> '.sidecar2' (black one), it always moves the slider with red <code>&lt;span&gt;</code> attached to it. The reason behind that is, it is the first handle in the code, between two. </p> <p>I have tried everything I could, to fix it. E.g. Tried to manually add classes <code>ui-state-active ui-state-focus</code> to the second(BLACK) slider, tried to change z-index, but none of them are working. :(</p> <p>Any help would be appreciated.</p> <p>Thank you.</p> <p><strong>Edit:</strong> The only solution I could find is given here: I have created 2 sliders on top of each other with one handle in each. It works perfect.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload