Maybe it is just me, but I having issues with the Try it Out: Your First jQuery Page. I get an error when loading the page:
Line: 834
Error: Object doesn't support this property or method
I changed the jquery to the normal vs. the min to help with the troubleshooting. Line 833 and 834 are as follows:
[code]
// Use the handy event callback
document.addEventListener( "DOMContentLoaded", completed, false );
[\code]
I am using jquery-2.0.3.
js
This is my code from the jquery.aspx
[code]
<%@ Page Title="jQuery Demo" Language="C#" MasterPageFile="~/MaterPages/Frontend.master" AutoEventWireup="true" CodeFile="jQuery.aspx.cs" Inherits="Demos_jQuery" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" runat="Server">
<input id="Button1" type="button" value="button" />
<script type="text/javascript">
$(document).ready(function () {
$('#MainContent').css('background-color', 'green')
$('#Button1').click(function () {
$('#MainContent').css('background-color', 'red')
.animate({ width: '100px', height: '800px' })
});
});
</script>
</asp:Content>
[\code]
(note the spelling of "MaterPages" in case you are copying the code)
Here is my masterpage....
[code]
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Frontend.master.cs" Inherits="MasterPages_Frontend" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<script src="/Scripts/modernizr-2.6.2.
js"></script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
<Scripts>
<asp:ScriptReference Path="~/Scripts/jquery-2.0.3.
js" />
</Scripts>
</asp:ScriptManager>
<div id="PageWrapper">
<header><a href="/"></a></header>
<nav>
<asp:Menu ID="Menu1" runat="server" CssClass="MainMenu" DataSourceID="SiteMapDataSource1" Orientation="Horizontal" StaticEnableDefaultPopOutImage="False"></asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" ShowExpandCollapse="False">
<LevelStyles>
<asp:TreeNodeStyle CssClass="FirstLevelMenuItems" />
</LevelStyles>
</asp:TreeView>
</nav>
<section id="MainContent">
<asp:ContentPlaceHolder ID="cpMainContent" runat="server">
</asp:ContentPlaceHolder>
</section>
<aside id="Sidebar">
Select a theme<br />
<asp:DropDownList ID="ThemeList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ThemeList_SelectedIndexCha nged">
<asp:ListItem>Monochrome</asp:ListItem>
<asp:ListItem>DarkGrey</asp:ListItem>
</asp:DropDownList>
<br />
<br />
<br />
<Wrox:Banner ID="Banner1" runat="server" DisplayDirection="Horizontal" />
</aside>
<footer>Footer Goes Here</footer>
</div>
</form>
</body>
</html>
[\code]
Any thoughts?
Thank you in advance.