【发布时间】:2011-01-11 03:36:40
【问题描述】:
我被这个困住了,谁能帮帮我...
这里是html
<tr class="appendvalue">
<td colspan="2">
<asp:DropDownList ID="ddlSource" runat="server"></asp:DropDownList>
<asp:TextBox ID="txtSourceValue" runat="server" CssClass="hide" />
<a href="#" class="t12">add static value</a>
</td>
这里是jquery
$(document).ready(function() {
$('.appendvalue > td > a').live("click", function(e) {
e.preventDefault();
$(this).prev().prev().toggle();
$(this).prev().toggle();
$(this).toggle(function() { $(this).text("select from dropdown"); }, function() { $(this).text("add static value"); });
});
});
第一次点击后,它只切换锚文本而不切换下拉和文本框..
【问题讨论】: