<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<link href="../../Content/CSS/lavalamp.css" type="text/css" rel="stylesheet"/>
<script src="../../Scripts/jquery-1.4.1.js" type="text/javascript" />
<script src="../../S开发者_如何学Gocripts/jquery.lavalamp.js" type="text/javascript" />
<script src="../../Scripts/jquery.easing.min.js" type="text/javascript" />
<title>DatsWussup</title>
</head>
<body>
<div>
<ul class="lavaLampWithImage">
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</body>
<script type="text/javascript">
$(function () { $(".lavaLampWithImage").lavaLamp({ fx: "backout", speed: 700 }) });
</script>
</html>
So that's my master page. This is my view:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/DatsWussup.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
</asp:Content>
I included all the lavalamp plugin files in my project, and there are located in the Scripts/ and Content/ folders, which are both two layers above the master page file.
What am I doing wrong? The page comes up completely blank.
The firebug 'Net' tab says it's loading the CSS and jquery-1.4.1.js file fine, but not the others, and it's also supposed to be pulling down some images that are referenced in the CSS file as well like this:
url("../Images/bg.gif")
Where the Images/ and CSS/ folders are on the same layer.
Thanks guys.
Script tags should not be self closed, you should write out <script></script>
instead of <script />
精彩评论