UpdatePanel中使用jquery tabs
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<link href="css/StyleSheet.css" rel="stylesheet" type="text/css" />
<link href="css/linkedin-blue.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.1.3.1.pack.js" type="text/javascript"></script>
<script src="js/jquery.history_remote.pack.js" type="text/javascript"></script>
<script src="js/jquery.tabs.pack.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$('#container-1').tabs();
$("#LinkButton1").click(function() {
$(this).parents('div').eq(1).triggerTab(2);
return false;
});
$("#Button1").click(function() {
$('#container-1').triggerTab(2);
return true;
});
});
</script>
<link rel="stylesheet" href="css/jquery.tabs.css" type="text/css" media="print, projection, screen">
<!-- Additional IE/Win specific style sheet (Conditional Comments) -->
<!--[if lte IE 7]>
<link rel="stylesheet" href="css/jquery.tabs-ie.css" type="text/css" media="projection, screen">
<![endif]-->
</head>
<body >
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="up1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="container-1">
<ul>
<li><a href="#fragment-1"><span>Agreement</span></a></li>
<li><a href="#fragment-2"><span>Primary Contact</span></a></li>
<li><a href="#fragment-3"><span>Tabs are flexible again</span></a></li>
</ul>
<div id="fragment-1" style="color:Yellow">
<p>First tab is active by default:<asp:LinkButton ID="LinkButton1" runat="server"
ForeColor="White" onclick="LinkButton1_Click">Save & Next</asp:LinkButton>
</p>
<pre><code>$('#container').tabs();</code></pre> <asp:Button ID="Button1"
runat="server" Text="Button" onclick="Button1_Click" />
</div>
<div id="fragment-2" style="color:Yellow">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
</div>
<div id="fragment-3" style="color:Yellow">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<p>
</p>
</form>
</body>
</html>