title: Switching A CSS file with JQuery in an ASP.Net MVC app
body: <p>I wanna switch the css that is being applied to my mvc app. I want to do this in my Index page. The defenition for the default css is in the site.master defined like this:</p>
  
  <pre><code>&lt;head runat="server"&gt;
  &lt;title&gt;&lt;asp:ContentPlaceHolder ID="TitleContent" runat="server" /&gt;&lt;/title&gt;
  &lt;link href="../../Content/Site.css" rel="stylesheet" type="text/css" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>The jquery I am trying to use which may or may not be right is</p>
  
  <pre><code> $(document).ready(function() { 
          $("link").attr("href", '../../Content/nick.css');
  
      });
  });
  </code></pre>
  
  <p>I wanna somehow put this jquery in the Index page (which is the basic Index view that loads with MVC)</p>
  
  <pre><code>&gt;   &lt;%@ Page Language="C#"
  &gt; MasterPageFile="~/Views/Shared/Site.Master"
  &gt; Inherits="System.Web.Mvc.ViewPage" %&gt;
  &gt; 
  &gt; &lt;asp:Content ID="Content1"
  &gt; ContentPlaceHolderID="TitleContent"
  &gt; runat="server"&gt;
  &gt;     Home Page
  &gt;     &lt;/asp:Content&gt;
  &gt;     &lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent"
  &gt; runat="server"&gt;
  &gt;         &lt;h2&gt;&lt;%: ViewData["Message"] %&gt;&lt;/h2&gt;
  &gt;         &lt;p&gt;
  &gt;             To learn more about ASP.NET MVC visit &lt;a
  &gt; href="http://asp.net/mvc"
  &gt; title="ASP.NET MVC
  &gt; Website"&gt;http://asp.net/mvc&lt;/a&gt;.
  &gt;         &lt;/p&gt;
  &gt;     &lt;/asp:Content&gt;
  </code></pre>
  
  <p>Can someone look at my jquery and see if its right and show my how I can hook this up? Thanks in advance</p>