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

Delay render menu on firefox

2 Answers 163 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Gummy Coder
Top achievements
Rank 1
Gummy Coder asked on 21 Mar 2012, 04:43 PM
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 Answers, 1 is accepted

Sort by
0
Gummy Coder
Top achievements
Rank 1
answered on 22 Mar 2012, 03:53 AM
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 ?
0
Kamen Bundev
Telerik team
answered on 22 Mar 2012, 09:13 AM
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!
Tags
Menu
Asked by
Gummy Coder
Top achievements
Rank 1
Answers by
Gummy Coder
Top achievements
Rank 1
Kamen Bundev
Telerik team
Share this question
or