This is a migrated thread and some comments may be shown as answers.
Tooltip for Checkbox
2 Answers 42 Views
This is a migrated thread and some comments may be shown as answers.
Henrik
Top achievements
Rank 1
Henrik asked on 02 Jan 2017, 02:06 PM

Hi,

 

I have a checkbox that should have a tooltip, but the tooltip never shows. Can you help me find what I am doing wrong? KeepComputer is (of course) a boolean.

            <tr>
                <td>@Html.Kendo().CheckBoxFor(m => m.KeepAccessBadge)</td>
                @Html.Kendo().Tooltip().For("#KeepAccessBadge").Content("Something...")
            </tr>

On other elements I have identical tooltips and they are working just as expected.

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Ianko
Telerik team
answered on 04 Jan 2017, 07:53 AM

Hello Henrik,

The tooltip won't show because teh CheckBoxFor helper renders and invisible input#KeepAccessBadge element. Thus, the input is acually never hover. It is its label that is hovered and interacted with. And you should configure the tooltip to target that element instead:

@Html.Kendo().CheckBoxFor(m => m.KeepAccessBadge).Label("Keep Access Badge")
@Html.Kendo().Tooltip().For("label[for='KeepAccessBadge']").Content("Something...")

Regards,

Ianko
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Henrik
Top achievements
Rank 1
answered on 04 Jan 2017, 08:04 AM

Hello Ianko,

 

Many thanks for this - works like a charm. I should have figured it out by myself.

 

Best regards,

Henrik

Asked by
Henrik
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Henrik
Top achievements
Rank 1
Share this question
or