Tootltip not working when loaded by ajax

4 posts, 0 answers
  1. Alan Mosley
    Alan Mosley avatar
    200 posts
    Member since:
    Apr 2010

    Posted 25 Mar 2013 Link to this post

    I have some tooltips working, but when targets are loaded via ajax they no longer work.
    How can I re-attach events after ajax load?

    Thanks
  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 25 Mar 2013 Link to this post

    Hello Alan,

    I'm afraid that I'm not sure what may caused such behavior judging by the provided details. Therefore, could you please provide a small sample in which this can be observed locally.

    Regards,
    Rosen
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Alan Mosley
    Alan Mosley avatar
    200 posts
    Member since:
    Apr 2010

    Posted 26 Mar 2013 Link to this post

    when making a sample project, I found that all works when the .For("#container")  is not in the ajax loaded content, but when the .For("#container") is in the ajax loaded content then it does not work.
    While I can now get it to work, I really need the ajax loaded content to be able to stand alone and not be dependent on the page it is loaded into.
    Is there any way to trigger the tooltip to recognize the container when loaded by ajax

    I could not upload a sample project because of 2mb limit.

    Thanks
  5. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 26 Mar 2013 Link to this post

    Hi Alan,

    I'm afraid that it is not possible to initialize widget over an element which does not exists on the page at the point of the initialization. Thus, you should initialize the Tooltip manually after the AJAX content is appended on the page. Instead, you may also consider adding the Tooltip declaration within the View loaded via the AJAX. 

    Regards,
    Rosen
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
UI for ASP.NET MVC is VS 2017 Ready