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

Scheduler finished loading event

1 Answer 111 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Chad
Top achievements
Rank 2
Chad asked on 25 Jul 2015, 01:42 AM
I have tooltips that I'm trying to initialize and I can't get it to work on the initial load of my view. The function is firing but it seems like the events have not been created yet on the DOM so I'm not able to attach a click event to them. I'm using a custom template with a class ".app". I'm doing a $('.app').each to find all my events on the scheduler. If I click one of the views or reload it with a button click it works. just when it officially loads for the first time. Any help would be great.

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 28 Jul 2015, 07:58 AM
Hi,

Instead of going through each event and adding the click handler, use event delegation. That way you can attach the click handler even before the actual events are loaded on the page. 

Here's a small dojo sample demonstrating the approach:
http://dojo.telerik.com/ONewo

Regards,
Bozhidar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Scheduler
Asked by
Chad
Top achievements
Rank 2
Answers by
Bozhidar
Telerik team
Share this question
or