Delay render menu on firefox

3 posts, 0 answers
  1. Gummy Coder
    Gummy Coder avatar
    6 posts
    Member since:
    Apr 2011

    Posted 21 Mar 2012 Link to this post

    Hi guys,

    I have a problem with kendo menu view on firefox. I have attached 2 images on this post, 1.jpg first and then 2.jpg, it happens in 1 ms, quite fast but enough to see each press F5. It only happens on firefox, there is no problem on IE. Could you please help me to resolve this.

    This is my code

    <!DOCTYPE html>
    <html>
    <head>
        <title>@ViewBag.Title</title>
        <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
        <link href="@Url.Content("~/Content/kendo.common.min.css")" rel="stylesheet" type="text/css" />
        <link href="@Url.Content("~/Content/kendo.default.min.css")" rel="stylesheet" type="text/css" />
        <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/kendo.all.min.js")" type="text/javascript"></script>
    </head>
    <body>
        <ul id="nav">
            @for (var i = 0; i < 20; i++)
            {
                <li>Hello</li>
            }
        </ul>
        <div>
            @RenderBody()
        </div>
    </body>
    </html>
    <script type="text/javascript">
        $(function () {
            $("#nav").kendoMenu();
        });
    </script>

    Thank you,
  2. Gummy Coder
    Gummy Coder avatar
    6 posts
    Member since:
    Apr 2011

    Posted 21 Mar 2012 Link to this post

    I have found the solution to resolve this problem is using

            $("#nav").kendoMenu();

    instead of

    $(function () {
            $("#nav").kendoMenu();
        });

    JQuery's $(function(){ }) event slow down Kendo Menu render right ? And should I use above code ?
  3. Kendo UI is VS 2017 Ready
  4. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 22 Mar 2012 Link to this post

    Hello,

    ASP.NET MVC always renders the script tags at the end of the document, so the change you've would have difference in milliseconds in execution start. If it helps - great.

    Regards,
    Kamen Bundev
    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