문제점은 asp.net UpdatePanel 컨트롤에서 새로 고쳐지는 툴팁이있는 항목에 JQuery 도구 설명 도구 플러그인 (http://flowplayer.org/tools/tooltip.html)을 사용하는 것과 관련이 있습니다. 문제는 툴팁이 추가 된 후 UpdatePanel에서 부분 포스트 백이 발생하면 툴팁이 업데이트 된 UpdatePanels에서 작동하지 않는다는 것입니다. 툴팁은 부분 포스트 백이 될 때까지 훌륭하게 작동합니다. 다음은 페이지의 이미지 (및 다른 컨트롤)에 툴팁을 추가하는 방법의 예입니다. 일부 코드는 간단하게하기 위해 ommitted되었습니다UpdatePanel을 사용한 JQuery 도구 도움말 설명
매우 흥미<script type="text/javascript">
//--call this to add tooltips to any element with a class of "tooltipHandle"
function createTooltip(){
// select all desired input fields and attach tooltips to them
$(".tooltipHandle").tooltip({
// place tooltip on the right edge
position: ['center', 'right'],
// a little tweaking of the position
offset: [-2, 10],
// use a simple show/hide effect
effect: 'toggle',
// custom opacity setting
opacity: 0.7
});
}
//--add tooltips after every postback (including partial AJAX postbacks)
function pageLoad(sender, args) {
createTooltip();
}
</script>
<html>
<!-- assume this UpdatePanel is updated from the code behind--!>
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="upPanelPrivateMediaList">
<ContentTemplate>
<img class="tooltipHandle" src="/images/questionMark.gif"/>
<div class="tooltip">SOME GREAT TOOLTIP CONTENT</div>
</ContentTemplate>
</asp:UpdatePanel>
</html>
것은 내가 처음으로 페이지가로드 ") (createToolTip"를 호출하지 않는 경우, 부분 다시 게시가 제대로에 툴팁을 추가 할 것입니다 내 이미지와 두 번째 다시 게시 할 때까지 작동합니다. 즉, 툴팁이 이미있는 경우 부분 포스트 백이 툴팁을 위로 올리는 것을 의미합니다. 부분적인 포스트 백 후에 createToolTip()을 수동으로 호출하면 툴팁이 다시 작동하지 않습니다.
아이디어가 있거나 설명이 필요한 경우 알려주십시오. 미리 감사드립니다 !!
내가 열어 본 몇 가지 오래된 질문을 정리하고 .live()를 사용하는 것이 올바른 대답 (현재 내가 아는 바를 알고 있음)이라고 생각합니다. 질문을 마치자! – jakejgordon