Dynamic content

3 posts, 0 answers
  1. Gary
    Gary avatar
    10 posts
    Member since:
    Feb 2013

    Posted 03 Jun 2014 Link to this post

    I'm using a filter and setting the title attribute on an element, but the original title is appearing.

    I find that I need to also do this:

    $elem.data(kendo.ns + 'title', newTitle);

    ... for the new title to appear in the tooltip. However, IF I force a different tooltip to appear first, then my updated title attribute is displayed.

    Seems to me that in _show, a test should be made to check if the title attribute has changed;

                if (!current || current[0] != target[0] || _hasNewContent(target)) {
                    that.popup.options.anchor = target;

    _hasNewContent can compare the current title attribute to the value that's been saved off and, if different, reset the content.

  2. Vladimir Iliev
    Vladimir Iliev avatar
    2206 posts

    Posted 06 Jun 2014 Link to this post

    Hi Gary,

    From the provided information it seems that you need to refresh the tooltip content each time it's opened and the title of the element is changed - this can be achieved using the "show" event and the "refresh" method as demonstrated below:

    var tooltip = $("#agglomerations").kendoTooltip({
        filter: "a",
        width: 120,
        show: function(e) {
            if(this.content.text() != this.target().data("title")) {
        position: "top"

    Vladimir Iliev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Gary
    Gary avatar
    10 posts
    Member since:
    Feb 2013

    Posted 09 Jun 2014 in reply to Vladimir Iliev Link to this post

    Thank you. That is very helpful.
Back to Top