Ciaran Gallagher
Ciaran Gallagher

Reputation: 4020

How to use ASP.NET MVC 4 with preinstalled JQuery UI library

So having successfully used JQuery Mobile with my mobile application I was looking to use JQuery UI with my web application. My web application is an ASP.NET MVC 4 project created in Visual Studio 2012.

However, I realised that when I created the MVC 4 project, it actually already includes JQuery UI - it's just not being used currently.

I noticed that the Microsoft ASP.NET MVC website doesn't make any mention to the preinstalled JQuery and JQuery UI libraries in any of its tutorials or code samples, which I find odd. I also noticed that none of my MVC 4 books gave any reference to the preinstalled JQuery libraries.

So my question is, I have JQuery UI preinstalled, how do I start making use of the files? I mean I guess I'll reference them from my Views, but which files do I reference?

Is there any existing documentation that would help me make the most of the preinstalled JQuery libraries?

Upvotes: 0

Views: 3547

Answers (1)

RAS
RAS

Reputation: 3385

If you're using MVC4 everything should be preset for you in BundleConfig.cs (App_Start folder) Just include the bundles that you want to use.
usually for Javascript you only need jquery-ui-{version}.js file, and the rest is css styling that you want to apply.

Note: make sure that you're using the latest jquery UI. if it is not the latest, I suggest to update your Jquery UI directly through package manager.

Upvotes: 1

Related Questions