question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hide a knob [feature]

See original GitHub issue

It 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:closed
  • Created 8 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jt196commented, Oct 31, 2021

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.

0reactions
github-actions[bot]commented, May 24, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found