{"id":1454,"date":"2013-08-01T16:35:00","date_gmt":"2013-08-01T16:35:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2013\/08\/01\/make-jquery-ui-and-bootstrap-2-work-together-in-mvc-template\/"},"modified":"2022-08-09T06:18:01","modified_gmt":"2022-08-09T13:18:01","slug":"make-jquery-ui-and-bootstrap-2-work-together-in-mvc-template","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/make-jquery-ui-and-bootstrap-2-work-together-in-mvc-template\/","title":{"rendered":"Make jQuery UI and Bootstrap 2 work together in MVC template"},"content":{"rendered":"<p>In the VS2013 preview MVC5 template, we included Bootstrap and jQuery UI together in the same project. However, some themes of jQuery UI (1.8.24 in the project template) is conflicting with Bootstrap (version 2.3.1 in the project template), especially for button. We have seen at least one such question in our forum.<\/p>\n<p>Let&rsquo;s create a test project first to see the effect.<\/p>\n<p>1. File-&gt;New Project, choose Templates-&gt;Web-&gt;ASP.NET Web Application, select MVC, click Create Project<\/p>\n<p>2. Right click project and choose &ldquo;Manage NuGet Packages&rdquo;, go to &ldquo;Updates&rdquo; tab, and update &ldquo;jQuery UI (Combined Library)&rdquo; to the latest version (1.10.3 at the time of writing)<\/p>\n<p>3. Change the <em>App_Start\/BundleConig.cs<\/em> file to include the jQuery UI js file.<\/p>\n<div id=\"scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfe6d913-df8e-44fd-9583-c569c5d62868\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px;padding: 0px;float: none\">\n<div style=\"border: #000080 1px solid;color: #000;font-family: 'Courier New', Courier, Monospace;font-size: 10pt\">\n<div style=\"background: #000080;color: #fff;font-family: Verdana, Tahoma, Arial, sans-serif;font-weight: bold;padding: 2px 5px\">Code Snippet<\/div>\n<div style=\"background: #ddd;max-height: 300px;overflow: auto\">\n<ol style=\"background: #ffffff;margin: 0 0 0 2em;padding: 0 0 0 5px\" start=\"1\">\n<li><span style=\"background: #ffffff;color: #000000\">bundles.Add(<\/span><span style=\"background: #ffffff;color: #0000ff\">new<\/span><span style=\"background: #ffffff;color: #2b91af\">ScriptBundle<\/span><span style=\"background: #ffffff;color: #000000\">(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/bundles\/jqueryUI&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">).Include(<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #a31515\">&#8220;~\/Scripts\/jquery-ui-{version}.js&#8221;<\/span><\/li>\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000\">));<\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p>4. Change the <em>Views\/Shared\/_Layout.cshtml<\/em> file to include the style and script bundles. Note we are letting jQuery UI script to overwrite bootstrap. (Will show difference later)<\/p>\n<div id=\"scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:db4ade89-4ffb-45a8-a640-980d459dd97c\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px;padding: 0px;float: none\">\n<div style=\"border: #000080 1px solid;color: #000;font-family: 'Courier New', Courier, Monospace;font-size: 10pt\">\n<div style=\"background: #000080;color: #fff;font-family: Verdana, Tahoma, Arial, sans-serif;font-weight: bold;padding: 2px 5px\">Code Snippet<\/div>\n<div style=\"background: #ddd;max-height: 300px;overflow: auto\">\n<ol style=\"background: #ffffff;margin: 0 0 0 2em;padding: 0 0 0 5px\" start=\"1\">\n<li><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #2b91af\">Styles<\/span><span style=\"background: #ffffff;color: #000000\">.Render(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/Content\/css&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #2b91af\">Styles<\/span><span style=\"background: #ffffff;color: #000000\">.Render(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/Content\/themes\/base\/css&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<li><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #2b91af\">Scripts<\/span><span style=\"background: #ffffff;color: #000000\">.Render(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/bundles\/modernizr&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<div id=\"scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:8dc798cd-0b58-42ad-9aa3-db310d420ce6\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px;padding: 0px;float: none\">\n<div style=\"border: #000080 1px solid;color: #000;font-family: 'Courier New', Courier, Monospace;font-size: 10pt\">\n<div style=\"background: #000080;color: #fff;font-family: Verdana, Tahoma, Arial, sans-serif;font-weight: bold;padding: 2px 5px\">Code Snippet<\/div>\n<div style=\"background: #ddd;max-height: 300px;overflow: auto\">\n<ol style=\"background: #ffffff;margin: 0 0 0 2em;padding: 0 0 0 5px\" start=\"1\">\n<li><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #2b91af\">Scripts<\/span><span style=\"background: #ffffff;color: #000000\">.Render(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/bundles\/jquery&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #2b91af\">Scripts<\/span><span style=\"background: #ffffff;color: #000000\">.Render(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/bundles\/bootstrap&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<li><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #2b91af\">Scripts<\/span><span style=\"background: #ffffff;color: #000000\">.Render(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/bundles\/jqueryUI&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #000000\">RenderSection(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;scripts&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">, required: <\/span><span style=\"background: #ffffff;color: #0000ff\">false<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>5. Add the following test code to the end of <em>Views\/Home\/Index.cshtml<\/em> file<\/p>\n<div id=\"scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a8de8cce-70ab-4c25-9cb1-af35fb560923\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px;padding: 0px;float: none\">\n<div style=\"border: #000080 1px solid;color: #000;font-family: 'Courier New', Courier, Monospace;font-size: 10pt\">\n<div style=\"background: #000080;color: #fff;font-family: Verdana, Tahoma, Arial, sans-serif;font-weight: bold;padding: 2px 5px\">Code Snippet<\/div>\n<div style=\"background: #ddd;max-height: 300px;overflow: auto\">\n<ol style=\"background: #ffffff;margin: 0 0 0 2.5em;padding: 0 0 0 5px\" start=\"1\">\n<li>&nbsp;<\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background: #ffffff;color: #0000ff\">&lt;<\/span><span style=\"background: #ffffff;color: #800000\">div<\/span><span style=\"background: #ffffff;color: #ff0000\">class<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;row&#8221;&gt;<\/span><\/li>\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #0000ff\">&lt;<\/span><span style=\"background: #ffffff;color: #800000\">button<\/span><span style=\"background: #ffffff;color: #ff0000\">id<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;jQueryUIButton&#8221;<\/span><span style=\"background: #ffffff;color: #ff0000\">class<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;btn btn-info&#8221;&gt;<\/span><span style=\"background: #ffffff;color: #000000\">BootStrap and JQueryUI<\/span><span style=\"background: #ffffff;color: #0000ff\">&lt;\/<\/span><span style=\"background: #ffffff;color: #800000\">button<\/span><span style=\"background: #ffffff;color: #0000ff\">&gt;<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #0000ff\">&lt;<\/span><span style=\"background: #ffffff;color: #800000\">button<\/span><span style=\"background: #ffffff;color: #ff0000\">class<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;btn btn-info&#8221;&gt;<\/span><span style=\"background: #ffffff;color: #000000\">BootStrap only<\/span><span style=\"background: #ffffff;color: #0000ff\">&lt;\/<\/span><span style=\"background: #ffffff;color: #800000\">button<\/span><span style=\"background: #ffffff;color: #0000ff\">&gt;<\/span><\/li>\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #0000ff\">&lt;<\/span><span style=\"background: #ffffff;color: #800000\">button<\/span><span style=\"background: #ffffff;color: #ff0000\">id<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;jQueryUIButton2&#8243;&gt;<\/span><span style=\"background: #ffffff;color: #000000\">JQueryUI only<\/span><span style=\"background: #ffffff;color: #0000ff\">&lt;\/<\/span><span style=\"background: #ffffff;color: #800000\">button<\/span><span style=\"background: #ffffff;color: #0000ff\">&gt;<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;<\/li>\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #0000ff\">&lt;<\/span><span style=\"background: #ffffff;color: #800000\">input<\/span><span style=\"background: #ffffff;color: #ff0000\">id<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;jQueryUISubmitButton&#8221;<\/span><span style=\"background: #ffffff;color: #ff0000\">class<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;btn btn-info&#8221;<\/span><span style=\"background: #ffffff;color: #ff0000\">type<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;submit&#8221;<\/span><span style=\"background: #ffffff;color: #ff0000\">value<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;Input BootStrap and JQueryUI&#8221;<\/span><span style=\"background: #ffffff;color: #0000ff\">\/&gt;<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #0000ff\">&lt;<\/span><span style=\"background: #ffffff;color: #800000\">input<\/span><span style=\"background: #ffffff;color: #ff0000\">class<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;btn btn-info&#8221;<\/span><span style=\"background: #ffffff;color: #ff0000\">type<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;submit&#8221;<\/span><span style=\"background: #ffffff;color: #ff0000\">value<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;Input BootStrap only&#8221;<\/span><span style=\"background: #ffffff;color: #0000ff\">\/&gt;<\/span><\/li>\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #0000ff\">&lt;<\/span><span style=\"background: #ffffff;color: #800000\">input<\/span><span style=\"background: #ffffff;color: #ff0000\">id<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;jQueryUISubmitButton2&#8243;<\/span><span style=\"background: #ffffff;color: #ff0000\">type<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;submit&#8221;<\/span><span style=\"background: #ffffff;color: #ff0000\">value<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;Input JQueryUI only&#8221;<\/span><span style=\"background: #ffffff;color: #0000ff\">\/&gt;<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;<\/li>\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #0000ff\">&lt;<\/span><span style=\"background: #ffffff;color: #800000\">a<\/span><span style=\"background: #ffffff;color: #ff0000\">id<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;jQueryUIAnchor&#8221;<\/span><span style=\"background: #ffffff;color: #ff0000\">class<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;btn btn-info&#8221;<\/span><span style=\"background: #ffffff;color: #ff0000\">href<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;#&#8221;&gt;<\/span><span style=\"background: #ffffff;color: #000000\">anchor Bootstrap and JQueryUI<\/span><span style=\"background: #ffffff;color: #0000ff\">&lt;\/<\/span><span style=\"background: #ffffff;color: #800000\">a<\/span><span style=\"background: #ffffff;color: #0000ff\">&gt;<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #0000ff\">&lt;<\/span><span style=\"background: #ffffff;color: #800000\">a<\/span><span style=\"background: #ffffff;color: #ff0000\">class<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;btn btn-info&#8221;<\/span><span style=\"background: #ffffff;color: #ff0000\">href<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;#&#8221;&gt;<\/span><span style=\"background: #ffffff;color: #000000\">anchor Bootstrap only<\/span><span style=\"background: #ffffff;color: #0000ff\">&lt;\/<\/span><span style=\"background: #ffffff;color: #800000\">a<\/span><span style=\"background: #ffffff;color: #0000ff\">&gt;<\/span><\/li>\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #0000ff\">&lt;<\/span><span style=\"background: #ffffff;color: #800000\">a<\/span><span style=\"background: #ffffff;color: #ff0000\">id<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;jQueryUIAnchor2&#8243;<\/span><span style=\"background: #ffffff;color: #ff0000\">href<\/span><span style=\"background: #ffffff;color: #0000ff\">=&#8221;#&#8221;&gt;<\/span><span style=\"background: #ffffff;color: #000000\">anchor JQueryUI only<\/span><span style=\"background: #ffffff;color: #0000ff\">&lt;\/<\/span><span style=\"background: #ffffff;color: #800000\">a<\/span><span style=\"background: #ffffff;color: #0000ff\">&gt;<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background: #ffffff;color: #0000ff\">&lt;\/<\/span><span style=\"background: #ffffff;color: #800000\">div<\/span><span style=\"background: #ffffff;color: #0000ff\">&gt;<\/span><\/li>\n<li>&nbsp;<\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background: #ffff00;color: #000000\">@section Scripts {<\/span><\/li>\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #0000ff\">&lt;<\/span><span style=\"background: #ffffff;color: #800000\">script<\/span><span style=\"background: #ffffff;color: #0000ff\">&gt;<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000\">$(<\/span><span style=\"background: #ffffff;color: #0000ff\">function<\/span><span style=\"background: #ffffff;color: #000000\"> () {<\/span><\/li>\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000\">$(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;#jQueryUIButton&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">).button();<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000\">$(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;#jQueryUIButton2&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">).button();<\/span><\/li>\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000\">$(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;#jQueryUISubmitButton&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">).button();<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000\">$(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;#jQueryUISubmitButton2&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">).button();<\/span><\/li>\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000\">$(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;#jQueryUIAnchor&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">).button();<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000\">$(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;#jQueryUIAnchor2&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">).button();<\/span><\/li>\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000\">});<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #0000ff\">&lt;\/<\/span><span style=\"background: #ffffff;color: #800000\">script<\/span><span style=\"background: #ffffff;color: #0000ff\">&gt;<\/span><\/li>\n<li><span style=\"background: #ffffff;color: #000000\">}<\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>6. Run it, you can see the fonts are very different between the &ldquo;BootStrap and JqueryUI&rdquo; elements and &ldquo;BootStrap only&rdquo; element.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/08\/0257.clip_image002_thumb_065F1FC0.jpg\"><img decoding=\"async\" title=\"clip_image002\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/08\/0257.clip_image002_thumb_065F1FC0.jpg\" alt=\"clip_image002\" width=\"628\" height=\"112\" border=\"0\" \/><\/a><\/p>\n<p>7. The order of including the Bootstrap JavaScript file and the jQuery UI JavaScript file matters. If we change step 4&rsquo;s script order to put Bootstrap after jQuery UI script:<\/p>\n<div id=\"scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:ecec1589-9275-489b-a65b-2e5ec56ea31b\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px;padding: 0px;float: none\">\n<div style=\"border: #000080 1px solid;color: #000;font-family: 'Courier New', Courier, Monospace;font-size: 10pt\">\n<div style=\"background: #000080;color: #fff;font-family: Verdana, Tahoma, Arial, sans-serif;font-weight: bold;padding: 2px 5px\">Code Snippet<\/div>\n<div style=\"background: #ddd;max-height: 300px;overflow: auto\">\n<ol style=\"background: #ffffff;margin: 0 0 0 2em;padding: 0 0 0 5px\" start=\"1\">\n<li><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #2b91af\">Scripts<\/span><span style=\"background: #ffffff;color: #000000\">.Render(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/bundles\/jquery&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #2b91af\">Scripts<\/span><span style=\"background: #ffffff;color: #000000\">.Render(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/bundles\/jqueryUI&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<li><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #2b91af\">Scripts<\/span><span style=\"background: #ffffff;color: #000000\">.Render(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/bundles\/bootstrap&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #000000\">RenderSection(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;scripts&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">, required: <\/span><span style=\"background: #ffffff;color: #0000ff\">false<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p>Run it, you can see &ldquo;anchor JQueryUI only&rdquo; does not get changed to button.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/08\/6557.clip_image003_thumb_25A1C693.png\"><img decoding=\"async\" title=\"clip_image003\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/08\/6557.clip_image003_thumb_25A1C693.png\" alt=\"clip_image003\" width=\"545\" height=\"111\" border=\"0\" \/><\/a><\/p>\n<p>&ldquo;<a href=\"http:\/\/addyosmani.github.io\/jquery-ui-bootstrap\/\">jQuery UI Bootstrap<\/a>&rdquo; can be used to make step 6 results a little bit better.<\/p>\n<p>8. Revert step 7, Go to <a href=\"http:\/\/addyosmani.github.io\/jquery-ui-bootstrap\/\">http:\/\/addyosmani.github.io\/jquery-ui-bootstrap\/<\/a> and download the latest archive, unzip the archive, locate &ldquo;css\/custom-theme&rdquo; folder. Drag and drop images folder and latest jquery-ui-*.custom.css and jquery.ui.*.ie.css files to the project Content folder in solution explorer.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/08\/7462.clip_image004_thumb_5D740AB6.png\"><img decoding=\"async\" title=\"clip_image004\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/08\/7462.clip_image004_thumb_5D740AB6.png\" alt=\"clip_image004\" width=\"336\" height=\"526\" border=\"0\" \/><\/a><\/p>\n<p>9. Add the following bundle in <em>App_Start\/BundleConig.cs<\/em><\/p>\n<div id=\"scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:cb79b204-d93f-4e00-9a07-395421661444\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px;padding: 0px;float: none\">\n<div style=\"border: #000080 1px solid;color: #000;font-family: 'Courier New', Courier, Monospace;font-size: 10pt\">\n<div style=\"background: #000080;color: #fff;font-family: Verdana, Tahoma, Arial, sans-serif;font-weight: bold;padding: 2px 5px\">Code Snippet<\/div>\n<div style=\"background: #ddd;max-height: 500px;overflow: auto\">\n<ol style=\"background: #ffffff;margin: 0 0 0 2em;padding: 0 0 0 5px\" start=\"1\">\n<li><span style=\"background: #ffffff;color: #000000\">bundles.Add(<\/span><span style=\"background: #ffffff;color: #0000ff\">new<\/span><span style=\"background: #ffffff;color: #2b91af\">StyleBundle<\/span><span style=\"background: #ffffff;color: #000000\">(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/Content\/jqueryUIBootstrapCSS&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">).Include(<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #a31515\">&#8220;~\/Content\/jquery-ui-1.10.0.custom.css&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">,<\/span><\/li>\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #a31515\">&#8220;~\/Content\/jquery.ui.1.10.0.ie.css&#8221;<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000\">));<\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p>10. Change the CSS include in <em>Views\/Shared\/_Layout.cshtml<\/em>:<\/p>\n<div id=\"scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fb5d8eca-1218-435f-be00-71261f063160\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px;padding: 0px;float: none\">\n<div style=\"border: #000080 1px solid;color: #000;font-family: 'Courier New', Courier, Monospace;font-size: 10pt\">\n<div style=\"background: #000080;color: #fff;font-family: Verdana, Tahoma, Arial, sans-serif;font-weight: bold;padding: 2px 5px\">Code Snippet<\/div>\n<div style=\"background: #ddd;max-height: 300px;overflow: auto\">\n<ol style=\"background: #ffffff;margin: 0 0 0 2em;padding: 0 0 0 5px\" start=\"1\">\n<li><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #2b91af\">Styles<\/span><span style=\"background: #ffffff;color: #000000\">.Render(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/Content\/css&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #2b91af\">Styles<\/span><span style=\"background: #ffffff;color: #000000\">.Render(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/Content\/jqueryUIBootstrapCSS&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<li><span style=\"background: #ffff00;color: #000000\">@*<\/span><span style=\"background: #ffffff;color: #006400\">@Styles.Render(&#8220;~\/Content\/themes\/base\/css&#8221;)<\/span><span style=\"background: #ffff00;color: #000000\">*@<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #2b91af\">Scripts<\/span><span style=\"background: #ffffff;color: #000000\">.Render(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/bundles\/modernizr&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>11. Run it.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/08\/4604.clip_image005_thumb_3EF9A400.png\"><img decoding=\"async\" title=\"clip_image005\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/08\/4604.clip_image005_thumb_3EF9A400.png\" alt=\"clip_image005\" width=\"565\" height=\"108\" border=\"0\" \/><\/a><\/p>\n<p>12. Do the same as step 7, we will get the exact same output as step 7, which is:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/08\/4544.clip_image006_thumb_2F769231.png\"><img decoding=\"async\" title=\"clip_image006\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/08\/4544.clip_image006_thumb_2F769231.png\" alt=\"clip_image006\" width=\"555\" height=\"99\" border=\"0\" \/><\/a><\/p>\n<p>From the above experiment, you can decide which combination of jQueryUI, BootStrap you&#8217;d like to use in your web project.<\/p>\n<p>I also tried Bootstrap 3 RC1 with jQuery UI 1.10.3 in a <a href=\"https:\/\/devblogs.microsoft.com\/00\/00\/00\/63\/56\/1856.WithBootStrap3RC.zip\">sample website<\/a> and the result is the same:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/08\/8231.clip_image008_thumb_0E831F8A.jpg\"><img decoding=\"async\" title=\"clip_image008\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/08\/8231.clip_image008_thumb_0E831F8A.jpg\" alt=\"clip_image008\" width=\"628\" height=\"723\" border=\"0\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the VS2013 preview MVC5 template, we included Bootstrap and jQuery UI together in the same project. However, some themes of jQuery UI (1.8.24 in the project template) is conflicting with Bootstrap (version 2.3.1 in the project template), especially for button. We have seen at least one such question in our forum. Let&rsquo;s create a [&hellip;]<\/p>\n","protected":false},"author":410,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[7440,7441],"class_list":["post-1454","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-bootstrap","tag-jquery-ui"],"acf":[],"blog_post_summary":"<p>In the VS2013 preview MVC5 template, we included Bootstrap and jQuery UI together in the same project. However, some themes of jQuery UI (1.8.24 in the project template) is conflicting with Bootstrap (version 2.3.1 in the project template), especially for button. We have seen at least one such question in our forum. Let&rsquo;s create a [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/1454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/410"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=1454"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/1454\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=1454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=1454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=1454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}