单击事件时打开Jquery模态对话框 [英] Open Jquery modal dialog on click event
本文介绍了单击事件时打开Jquery模态对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下代码仅对首次点击事件有效.但是,对于任何后续单击,都不会发生任何事情. 我在firefox,即ie7上进行了测试,但仍然相同.我想念什么吗?
The below code works fine for only the first click event. However for any subsequent click nothing happens. I tested this on firefox, ie7 but still the same. Am I missing something?
<script type="text/javascript">
$(document).ready(function() {
//$('#dialog').dialog();
$('#dialog_link').click(function() {
$('#dialog').dialog();
return false;
});
});
</script>
</head><body>
<div id="dialog" title="Dialog Title" style="display:none"> Some text</div>
<p id="dialog_link">Open Dialog</p>
</body></html>
推荐答案
尝试
$(document).ready(function () {
//$('#dialog').dialog();
$('#dialog_link').click(function () {
$('#dialog').dialog('open');
return false;
});
});
最后一部分有一个开放的arg
there is a open arg in the last part
这篇关于单击事件时打开Jquery模态对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文