PopOver - Load Dynamically?

5 posts, 0 answers
  1. Don
    Don avatar
    38 posts
    Member since:
    Oct 2006

    Posted 27 Jul 2012 Link to this post

    I am having an odd behavior with the PopOver widget.
    I dynamically load a <ul> prior to presenting the page. This works.

    However subsequent calls to the same function do not.
    I have also noticed this list has to be populated even prior to the page being rendered.

    I think these behaviors are related and therefore prohibit (multiple) binding of the list.
    Is this correct?
  2. Don
    Don avatar
    38 posts
    Member since:
    Oct 2006

    Posted 27 Jul 2012 Link to this post

    nevermind - I found the problem.

    I had 2 elements with the same ID (copy/paste) problem.
    I corrected the naming/id and works GREAT !

    maybe some help here though: how can we set this value??    
    alert( $("#popup").data("popup").height ); // 240

    this does not seem to work:
    $("#popup").data("kendoMobilePopOver").height = "100";
    * but I do have data-popup='{"height": 240, "width": 350}' set declaratively
  3. sdobrev
    sdobrev avatar
    54 posts
    Member since:
    Sep 2012

    Posted 28 Jul 2012 Link to this post

    Hi Don,

    Have you tried with height jQuery function?
  4. Don
    Don avatar
    38 posts
    Member since:
    Oct 2006

    Posted 29 Jul 2012 Link to this post

    yes I have tried that.

    I am also experiencing some odd behavior in that click events sometimes fire twice, sometimes not at all.
    I have created a jsFiddle app to demonstrate;
    http://jsfiddle.net/theDon911/adjHT/
  5. Don
    Don avatar
    38 posts
    Member since:
    Oct 2006

    Posted 30 Jul 2012 Link to this post

    ok - I found out what's going on.

    When I created my <li>'s dynamically, I bound a click event to the <label> element.
    at runtime, 2 separate click events were occuring;
    one on the label element initiated by the user,
    the other on the <input type=radio> element initiated by Kendo.

    my solution is an easy one:
    remove all click handlers and add the class="km-listview-label" markup to the (bound) <li>.
    This allows the popover to respond to the data-click event in the parent <ul>.

    seems simple, huh?

    still no luck with resizing though.
Back to Top