Hi there,
I think there's an issue with your HTML as it's missing the header and footer elements. The current jQuery code:
$('footer, header').slideUp('slow').slideDown('slow'); // Grouped
targets *elements* called footer or header. Your code doesn't have them, but in the book they exist:
Code:
<%@ Master Language="VB" CodeFile="Frontend.master.vb" 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.7.1.js"></script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Path="~/Scripts/WebForms/WebUIValidation.js" />
</Scripts>
</asp:ScriptManager>
<div id="PageWrapper">
<header><a href="/"></a></header>
<nav>
<asp:Menu ID="Menu1" runat="server" CssClass="MainMenu" Orientation="Horizontal" DataSourceID="SiteMapDataSource1" StaticEnableDefaultPopOutImage="False">
</asp:Menu>
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" ShowExpandCollapse="False">
<LevelStyles>
<asp:TreeNodeStyle CssClass="FirstLevelMenuItems" />
</LevelStyles>
</asp:TreeView>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />
</nav>
<section id="MainContent">
<asp:SiteMapPath ID="SiteMapPath1" runat="server"></asp:SiteMapPath>
<br />
<br />
<asp:ContentPlaceHolder ID="cpMainContent" runat="server">
</asp:ContentPlaceHolder>
</section>
<aside id="Sidebar">
Select a theme
<br />
<asp:DropDownList ID="ThemeList" runat="server" AutoPostBack="True">
<asp:ListItem>Monochrome</asp:ListItem>
<asp:ListItem>DarkGrey</asp:ListItem>
</asp:DropDownList>
<br />
<br />
<Wrox:Banner ID="Banner1" runat="server" DisplayDirection="Vertical" />
<br />
</aside>
<footer>Footer Goes Here</footer>
</div>
<asp:ContentPlaceHolder ID="cpClientScript" runat="server">
</asp:ContentPlaceHolder>
</form>
</body>
</html>
Using classes, or ID selectors as you showed also works, but using semantically correct elements like header and footer is more appropriate.
Cheers,
Imar