主叫jQuery的功能上数据列表按钮点击。当我点击另一行中的按钮时出现错误 当我点击第一行的第一个div时,打开第一个div所有按钮,我需要帮助。
function toggleDiv(divId) {
$("#shoow").toggle('slow');
}
<!-- language: lang-html -->
<asp:DataList ID="dtlRoomsPrice" Visible="false" orizontalAlign="center" runat="server"
ShowFooter="False" ShowHeader="False" Width="700px" OnItemDataBound="dtlRoomsDetails_ItemDataBound">
<ItemTemplate>
<table id="RoomList" style="width: 700px;" border="0" align="left">
<%
RowCount++;
if (UsingRows.IndexOf(RowCount.ToString()) != -1)
{
%>
<tr>
<td width="215" style="border: solid 1px #BDC7D8;">
<table border="0" id="LeftTable" width="190" border="0" align="left">
<tr>
<td class="shbe_h2" colspan="2">
<asp:Label ID="Label4" runat="Server" CssClass="shbe_label" Text='<%# DataBinder.Eval(Container, "DataItem.RoomType") %>'
Width="190px"></asp:Label>
<asp:Label ID="LabelGr" Visible="false" runat="Server" CssClass="shbe_label" Text='<%# DataBinder.Eval(Container, "DataItem.GuaranteeRequired") %>'></asp:Label>
</td>
</tr>
<tr>
<td style="width: 55px;">
<a class="thumbnail" href="#thumb">
<asp:Image Width="50" ID="RoomImg" runat="server" Height="50" ImageUrl='<%# DataBinder.Eval(Container, "DataItem.ImageRoomCode") %>' />
<span>
<asp:Image ID="Image1" Width="370" Height="246" runat="server" ImageUrl='<%# DataBinder.Eval(Container, "DataItem.ImageRoomCode") %>' /></span>
</a>
</td>
<td style="vertical-align: bottom; text-align: left;">
<asp:LinkButton ID="LinkButton1" OnClientClick="toggleDiv('shoow'); return false; " runat="server">ShowDetails</asp:LinkButton>
<asp:Label ID="lblAmiintiesTxt" runat="Server" CssClass="shbe_label" Text="<%$ Resources:Resource,Amenities %>"></asp:Label>
<asp:Label ID="lblAmiinties" runat="Server" CssClass="shbe_h2" Text='<%# Eval("Amenities") %>' Visible="false"></asp:Label>
<br />
<asp:Label ID="LblRoomDesc" runat="Server" CssClass="shbe_h2" Text='<%# DataBinder.Eval(Container, "DataItem.RoomText") %>'
Visible="false"></asp:Label>
<asp:Label ID="lblCanclText" Width="130" runat="server" CssClass="shbe_label" Text="<%$ Resources:Resource, Payment and Cancellation policy %>"></asp:Label>
<asp:Label ID="lblCancelation" runat="Server" CssClass="shbe_h2" Text='<%# Eval("CancellationPolicyText") %>' Visible="false"> </asp:Label>
</td>
</tr>
</table>
</td>
</tr>
<%}
%>
</table>
<table>
<tr>
<td id="shoow" style="width: 650px; height: 100px; background-color: blue; display: none"></td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>