我打开了一个对话框将照片设置为个人头像图片,...单击后如何关闭对话框?提前致谢,...
<script type="text/javascript">
$(document).ready(function() {
$('#profile_picture_dialog_<?php echo $profile['User']['id'] ?> a').each(function() {
var $link = $(this);
var $dialog = $('<div></div>')
.load($link.attr('href'))
.dialog({
autoOpen: false,
width: 500,
modal: true,
title: 'Set Profile Picture'
});
$link.click(function() {
$dialog.dialog('open');
return false;
});
});
});
</script>
这是对话框内容:(推测)
a href="/photos/ajax_set_buddy/148" Photo Image Here "/a"