Kendo Slider Tooltips works in one case not the other

2 posts, 0 answers
  1. Jacques
    Jacques avatar
    135 posts
    Member since:
    Jun 2007

    Posted 19 Sep 2014 Link to this post

    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? 
  2. Hristo Germanov
    Admin
    Hristo Germanov avatar
    703 posts

    Posted 23 Sep 2014 Link to this post

    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.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top