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:
<head runat="server">
<title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
<link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
The jquery I am trying to use which may or may not be right is
$(document).ready(function() {
$("link").attr("href", '../../Content/nick.css');
});
});
I wanna somehow put this jquery in the Index page (which is the basic Index view that loads with MVC)
> <%@ Page Language="C#"
> MasterPageFile="~/Views/Shared/Site.Master"
> Inherits="System.Web.Mvc.ViewPage" %>
>
> <asp:Content ID="Content1"
> ContentPlaceHolderID="TitleContent"
> runat="server">
> Home Page
> </asp:Content>
> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent"
> runat="server">
> <h2><%: ViewData["Message"] %></h2>
> <p>
> To learn more about ASP.NET MVC visit <a
> href="http://asp.net/mvc"
> title="ASP.NET MVC
> Website">http://asp.net/mvc</a>.
> </p>
> </asp:Content>
Can someone look at my jquery and see if its right and show my how I can hook this up? Thanks in advance
runat="serveron yourheadtag.