asp.net mvc 4 - JQuery UI not working in MVC 4 after Scripts.Render? -


Not sure what the problem is here I have read some other solutions and tried to use them, but nothing not working. All I have to do is present a diatipiker. I've done this many times before, just not sure if I'm having brain problems because I have gone for the last few weeks or "what" time.

  1. I have the latest JQuery (1.9.1), the latest JQuery UI (1.10.2).
  2. I have checked the bundle config, and they all look well:

      add bundle (add new scriptbundle ("~ / bundle / jquery "). Include (" ~ / scripts / jquery- {version} .js ")); Bundle Add ("~ / scripts / jquery-ui-{version} .js"); Add new scriptbundle ("~ / bundle / jqueryui"). Bundle Add ("~ / scripts / jquery.unobtrusive *", "~ / scripts / jquery.validate *"); (Add new scriptbundle ("~ / bundle / jqueryval"). // Use development version of Modernizr for development and learning. After that, when you are ready for production // use the build tool at http://modernizr.com so that only you can select the necessary tests. Bundles Add ("~ / / bundle / modern"). Include ("~ / scripts / modern-gym- *")); Bundles Add (New Style Bundle ("~ / Content / CSS"). ("~ / Content / site.css");); Please include ("~ / content / themes / base / jquery.ui.core.css", "~ / content / themes / base / jquery" (new style bundle ("~ / content / themes / base / css"). .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 "));  
  3. I The _Layout.cshtml header is set:

      @ styles.crt ("~ / content / css") @ script.render ("~ / / bundle / modern") @ script. "~ / Bundle / jquery") & lt; script & gt; $ (function () {$ ("# date picture"). DatePicker ();}); & Lt; / Script & gt;     

    And then added another scripts to the body. Render ("~ / bundle / jquery"). However, when I add Detector, nothing happens ... I get a text box.

    I have also tried:

    • Manually add script to title in the context
    • jquery script given in jquery ui demo (url) Adding to the context

      Nothing ... and I mean that nothing is working. I have checked my file paths twice, and they are right ... what am I missing ?!

      • be styles I

        In short: sung using @ Style Change the page to head .

      • At least in my code, only the junky bundle is included in the page head (using @Scripts.Render).
      • All other scripts (jquery again, jquery UI etc) should be rendered using @ scripts. Reload

        Code> @ Scripts.Render ("~ / bundles / jquery") @ Scripts.Render ("~ / @ScriptsRender (" ~ / / bundle / jqueryval ") @ ScriptsRenderer (" ~ / Bundle / Modern ") @RenderSearch ("Script", Required: False)

        And so I got the jquery IU job!

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -