저는이 문제에 대한 두뇌를 깨고 있었고 jQuery가 repeater 안에 배치 할 때 div를 표시하거나 숨기지 않을 이유를 알 수 없습니다.jQuery show/hide가 다른 div 내부에서 div를 움직일 때 작동하지 않습니다.
<div id="EmailForMoreInfo">Hey there!</div>
내가 보여 /하는 데 사용 숨길 JQuery와 여기에 있습니다 : : 여기/숨기기를 보여주기 위해 노력하고있어 DIV이다
는if (event.srcElement && event.srcElement.hash == "#2") {
$("#EmailForMoreInfo").show();
} else {
$("#EmailForMoreInfo").hide();
}
'EmailForMoreInfo'의 배치는 내부에 배치 리피터는 다음 'EmailForMoreInfo'가 중계기의 내부에 배치 할 때
jQuery를 위<div class="panes">
<asp:Repeater ID="rptProductsCategories" runat="server">
<ItemTemplate>
<div id="tabs-<%# DataBinder.Eval(Container.DataItem, "Key") %>">
<div id="EmailForMoreInfo">Hey there!</div>
<br style="clear:both;" />
</div>
</ItemTemplate>
</asp:Repeater>
</div>
이 작동하지 않습니다. 중계기 밖으로 이동하면 모든 것이 작동합니다. jQuery를 분석하면 두 경우 모두 요소를 잘 찾을 수 있지만 실제로 리피터 외부에있는 경우에만 올바르게 표시되거나 숨길 수 있습니다. 그렇지 않으면 항상 표시됩니다. 다른 사람이 이것을 실행하고 해결 방법이 있습니까?
jQuery가 "사양을 위반하고 document.getElementById'를 깨는 것만큼 혼란스럽지 않습니다." –