Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Jquery UI error
Message
De
12/04/2015 14:46:54
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
À
12/04/2015 14:16:35
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01618237
Message ID:
01618248
Vues:
48
>There is nothing loading the bundles.
>
>>They are loaded in the Bundles.config

Okay... here is bundles config:
  public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                        "~/Scripts/jquery-ui-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.unobtrusive*",
                        "~/Scripts/jquery.validate*"));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js",
                      "~/Scripts/respond.js"));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                      "~/Content/bootstrap.css",
                      "~/Content/site.css"));

            bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
                     "~/Content//themes/base/jquery.ui.core.css",
                     "~/Content//themes/base/jquery.ui.resizable.css",
                     "~/Content//themes/base/jquery.ui.selectable.css",
                     "~/Content//themes/base/jquery.ui.accordion.css",
                     "~/Content//themes/base/jquery.ui.autocomplete.css",
                     "~/Content//themes/base/jquery.ui.button.css",
                     "~/Content//themes/base/jquery.ui.dialog.css",
                     "~/Content//themes/base/jquery.ui.slider.css",
                     "~/Content//themes/base/jquery.ui.tabs.css",
                     "~/Content//themes/base/jquery.ui.datepicker.css",
                     "~/Content//themes/base/jquery.ui.progressbar.css",
                     "~/Content//themes/base/jquery.ui.theme.css"));
And then I made changes to render the bungles:
~!doctype html~

~html lang="en"~
    ~head~
        ~meta charset="utf-8"~
        ~title~accordion demo~/title~
        @Styles.Render("~/Content/css")
        @Styles.Render("~/bundles/modernizr")
        @Styles.Render("~/bundles/jquery")
        @Styles.Render("~/bundles/jqueryval")
        @Styles.Render("~/bundles/jqueryui")
        @Styles.Render("~/Content/themes/base/css")

       ~script~
            $(function () {
                $("#accordion").accordion();
            });
        ~/script~
    ~/head~
    ~body~
        ~div class="row"~
            ~div id="accordion"~
                ~h3~Section 1~/h3~
                ~div~
                    ~p~

                        Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
                    ~/p~
                ~/div~

                ~h3~Section 2~/h3~
                ~div~
                    ~p~
                        Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
                    ~/p~
                ~/div~
                ~h3~Section 3~/h3~
                ~div~
                    ~p~
                        lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
                    ~/p~
                    ~ul~
                        ~li~List item one~/li~
                    ~/ul~
                ~/div~
                ~h3~Section 4~/h3~
                ~div~
                    ~p~
                        Cras dictum. Pellentesque habitant morbi tristique senectus et netus
                    ~/p~
                    ~p~
                        inceptos himenaeos.
                    ~/p~
                ~/div~
            ~/div~
        ~/div~
     ~/body~
~/html~
And now the error changes:

Unhandled exception at line 111, column 5 in http://localhost:64779/Home/Index
0x800a1391 - JavaScript runtime error: '$' is undefined
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform