Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
How to display tooltip in knockoutjs when button is disabled

I used CSS to disable the button and I also want to display a tooltip. However just because I disabled the button, I am not able to see my tooltip.

.disabled {
    display: block !important; 
    pointer-events: none; 
    color: #ccc; 
}

  <button class="actionButton button primaryBt largeSize" data-bind="click:$root.openStaticVisualizer.bind($root, selectedRoom()), css: { disabled: !displayStaticVisualizer()}, attr:{ title :!displayStaticVisualizer()? ApprovalText: 'test' }">
                <svg class="ico visualizationIcon"><use xlink:href="Content/icons/icons.svg#visualizationIcon" /></svg>
                <span>Visualize Room</span>
            </button>

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Your .disabled class disables all pointer-events. This breaks all of the browser's default behaviors that rely on a pointer, like showing a title on hover.

Instead, use the disabled attribute. This does not block the title from showing, but does disable clicking the button.

You can apply the disabled attribute directly through knockout's disable and enable bindings.

You can apply custom styling by creating a css rule for the :disabled pseudo-class.

<button
  disabled
  title="This information appears when hovering"
>Hover me for more information</button>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!