This is a migrated thread and some comments may be shown as answers.

Kendo Slider Tooltips works in one case not the other

1 Answer 65 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Jacques
Top achievements
Rank 2
Jacques asked on 19 Sep 2014, 09:40 AM
If you see the attached images you'll notice that the slider on the right with the square drag handle has a working tooltip, but the slider on the left doesn't have a tooltip when dragged as you can see in the second image. 

I compared the two MVVM based implementations, stripped out the unnecessary information and came up with this: 
<input id="..." name="..." class="post-retirement" data-show-buttons="false" data-role="slider" data-min="0" data-max="2" data-small-step="0.01" value="" data-value="" data-bind="visible: isVisible, events: { change: onChange }" data-index="@i" data-tooltip="{format: '{0:p0}'}"  data-toggle="tooltip" />
<input id="..." name="..." class="weight-split" data-show-buttons="false" data-role="slider" data-min="0" data-max="1" data-small-step="0.01" value="" data-value="" data-bind="visible: isVisible, events: { change: onChange }" data-index="@i" data-tooltip="{format: '{0:p0}'}" data-toggle="tooltip" />

As you can see they're almost identical apart from class names which are used only to style the drag handles differently. 

The JavaScript that activates the tooltip and binds the MVVM objects looks like this: 
//activate tooltips
$("[data-toggle=\"tooltip\"]").tooltip();
 
var postRetirementViewModel = kendo.observable({
    isEnabled: true, 
    isVisible: true, 
    onChange: function (e)
    {
        //get the index for this row
        var index = $(e.sender.element).data("index");
 
        //removed for brevity
    }
});
 
var weightSplitViewModel = kendo.observable({
    isEnabled: true,
    isVisible: true,
    onChange: function (e)
    {
        //removed for brevity
    }
});
 
kendo.bind($(".post-retirement"), postRetirementViewModel);
 
kendo.bind($(".weight-split"), weightSplitViewModel);


Any idea why the left slider tooltip won't show up? 

1 Answer, 1 is accepted

Sort by
0
Hristo Germanov
Telerik team
answered on 23 Sep 2014, 07:35 AM
Hello Jacques,

Could you please give me a sample project or just a simple Kendo Dojo page that I can examine and advice you further. Because I am not able to reproduce this issue.

Regards,
Hristo Germanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Slider
Asked by
Jacques
Top achievements
Rank 2
Answers by
Hristo Germanov
Telerik team
Share this question
or