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

Tootltip not working when loaded by ajax

3 Answers 88 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Alan Mosley
Top achievements
Rank 1
Alan Mosley asked on 25 Mar 2013, 05:14 AM
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

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 25 Mar 2013, 09:30 AM
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!
0
Alan Mosley
Top achievements
Rank 1
answered on 26 Mar 2013, 09:10 AM
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
0
Rosen
Telerik team
answered on 26 Mar 2013, 09:30 AM
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!
Tags
ToolTip
Asked by
Alan Mosley
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Alan Mosley
Top achievements
Rank 1
Share this question
or