0
我在打开链接时打开jQuery对话框。对话框打开状态良好,但页面向下滚动到页面,因此我无法看到对话框,直到向上滚动。我该如何避免这种情况?单击链接时滚动到页面底部?
<script language="javascript" type="text/javascript">
$(document).ready(function() {
jQuery("#waitDialog").dialog({
autoOpen: false,
modal: true,
height: 375,
position: 'center',
width: 400,
draggable: true,
closeOnEscape: false,
open: function (type, data) {
$(".ui-dialog-titlebar-close").hide();
$(this).parent().appendTo("form");
}
});
});
function showDialog(id) {
$('#' + id).dialog("open");
}
</script>
<div id="waitDialog" style="display:none; cursor: default">
<table class="ms-authoringcontrols" style="border-top:1px black solid; border:1px black solid; height:70px " >
<tbody>
<tr>
<td class="ms-sectionheader ms-rightAlign">
Please wait.
</td>
</tr>
</tbody>
</table>
</div>
<map name="Map">
<area shape="rect" coords="225,16,287,33" href="/_layouts/MyAlerts.aspx" onclick="javascript:showDialog('waitDialog');" alt="My Alerts">
</map>
我们可以看到您的链接的代码? – mattsven 2011-04-07 19:22:56