Scheduler finished loading event

2 posts, 0 answers
  1. Chad
    Chad avatar
    13 posts
    Member since:
    Aug 2012

    Posted 24 Jul 2015 Link to this post

    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.
  2. Bozhidar
    Bozhidar avatar
    1192 posts

    Posted 28 Jul 2015 Link to this post


    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:

    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
Back to Top