在UpdatePanel中使用Jquery Tab,同时放一下按钮,点按钮后Jquery Tab居然失效,大家帮忙看看,以下是全部代码
Code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="tabtest.aspx.cs" Inherits="tabtest" %>
<!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">
<title></title>
<script type="text/javascript" src="jscripts/jquery.min.js"></script>
<link rel="stylesheet" href="jscripts/ui.tabs.css" type="text/css" media="print, projection, screen" />
<script src="jscripts/ui.tabs.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$('#container-1 ul').tabs();
});
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="Button1" runat="server" Text="Button" />
<div id="container-1">
<ul>
<li><a href="#fragment-1"><span>tab1</span></a></li>
<li><a href="#fragment-2"><span>tab2</span></a></li>
</ul>
<div id="fragment-1">
<p>content1</p>
</div>
<div id="fragment-2">
<p>content2</p>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>