我有:
<a href>
显示花式框的链接和- ,
<form>
当subtmit按钮点击ajax成功时在页面上显示一条消息。他们都工作正常。
代码如下。
<script>
$(document).ready(function ()
{ //this fancybox appears when <a href="..." ...>...</a> clicked
$(".fancybox-effects-d").fancybox({
padding:15,
closeBtn:true,
});
$("form#submit").submit(function ()
{
var name = $('#name').attr('value');
var password = $('#password').attr('value');
$.ajax({
type:"POST",
url:"index/success",
data:{ name:name, password:password},
success:function ()
{
//this form disappears and div appears when submit button of the <form id="submit" ...>...</form> clicked
$('form#submit').hide(function ()
{
$('div#errors').fadeIn(3000);
});
}
});
return false;
});
});
</script>
我想移动那个花式框以显示 ajax 成功。我该怎么做?