Hide a knob [feature]
See original GitHub issueIt would be nice to have a new feature to hide both (or desired) knob BUT NOT THE TOOLTIP (like for the disabled functions) :
// To disable
slider.setAttribute('hideHandle', true);
// To re-enable
slider.removeAttribute('hideHandle');
// To disable one handle
var origins = slider.getElementsByClassName('noUi-origin');
origins[0].setAttribute('hideHandle', true);
Why ? Because sometimes it’s nice to use the slider functionality (animation, tooltips…) without showing the knob. Typically I disabled the knob but I want it becomes hidden too.
Alternatively I’m “patching” css to have the tooltip above the disabled knob. It’s not very elegant but it works in my case :
slider.setAttribute("disabled", true);
$(this).find(".noUi-handle-upper .noUi-tooltip").css("z-index", "1000"); // place over to hide the knob
$(this).find(".noUi-tooltip").css("top", -4); // recenter on slider
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Dynamic creation of knobs — NDK Developers Guide
Some semblance of dynamism is given by the ability to show and hide knobs dependent on the state of others, however the knob's...
Read more >Dynamically add/remove knobs from gizmos - Ben McEwan
Some gizmos dynamically hide/show a number of knobs with the KnobChanged python callback. This is a good option to keep your gizmo's UI ......
Read more >Hide the Knob on Range Slider control? - Xamarin.Forms
Anyone know how to hide the knob on the SFRangeSlider control until the range slider is touched by a user? We have a...
Read more >[collected] Hide the volume knob - Suggest a feature - Volumio
I would like an option to hide the volume know, and replace it with a configured output level. It takes a lot of...
Read more >Shop online for hidden knob - AliExpress
Looking for hidden knob? This is a new rectangular hole drawer knob with invisible ring, the hidden pulls of the jewelry label is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry to drudge this up again 7 years later. @leongersen’s solution works well, there was some shadows remaining.
[disabled] .noUi-handle { background: none; border: none; box-shadow: none; }
seems to work, though I guess[disabled] .noUi-handle { display: none }
should also work pretty well.EDIT - I settled with
display: none
as the explicit option ended up with me a) having a mouseover area where the hidden handles were b) if the handle I wanted overlapped the hidden handles I couldn’t move it easily.This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.