jQuery ready event fires before telerik completly renders

2 posts, 0 answers
  1. Olivier Mangelschots
    Olivier Mangelschots avatar
    6 posts
    Member since:
    Jun 2004

    Posted 31 Oct 2008 Link to this post


    We are using the RadRotator and want to interact with it on the page uaing jQuery.

    jQuery has a ready function that fires after tthe DOM is loaded.

    This is our code :

     <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    function ScrollRotator()
    var rotator1 = $find("<%=RadRotatorLatestRegulatoryUpdates.ClientID%>");

    window.onload = ScrollRotator;  // works
    $(document).ready(ScrollRotator);        // does not work in IE, but does in FF

    Apparently the rotator1 variable will not be set to the RadRotator control in IE if we use jQuery.

    In firefox ze get the expected behaviour.

    Is RadRotator injecting HTML after the DOM is loaded so that jQuery cannot find it?

  2. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 03 Nov 2008 Link to this post

    Hello Olivier,

    No, but it seems that document.ready is not called at the same time in every browser. In scenarios like this I would suggest to use the ASP.NET AJAX's pageLoad() function. In addition, RadRotator, being an ASP.NET AJAX control, is loaded after MS AJAX's Init().

    Best wishes,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top