尝试学习 Jquery 并处于放弃的边缘!花了2天时间试图让一个对话框显示!
任何人都可以帮助解释为什么这段代码不起作用?我只是在页面顶部打招呼!
jQuery:
<script src="js/jquery-1.5.2.min.js" type="text/javascript"></script>
<script src="js/jquery.ui.core.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
var $dialog = $('#dialog')
//.html('This dialog will show every time!')
.dialog({
autoOpen: false,
title: 'Basic Dialog'
});
$('#opener').click(function() {
$dialog.dialog('open');
// prevent the default action, e.g., following a link
return false;
});
});
</script>
HTML
<div id="dialog">hello</div>
<button id="opener" style="margin-left:66px;margin-top:3px;font-size:11px;width:60px">Click</button>