我想用Jquery加载两个模态对话框。他们都使用ajax加载单独的页面。唯一的问题是只有其中一个工作。简化Jquery代码帮助!
我想我需要简化我的代码,但我不确定如何。
<script type="text/javascript">
$(document).ready(function(){
var dialogOpts = {
modal: true,
bgiframe: true,
autoOpen: false,
height: 400,
width: 550,
draggable: true,
resizeable: true,
title: "Your campaign rates",
};
$("#ratesbox").dialog(dialogOpts); //end dialog
$('#ratesbutton').click(
function() {
$("#ratesbox").load("rate_sheet/index.php", [], function(){
$("#ratesbox").dialog("open");
}
);
return false;
}
);
});
</script>
<script type="text/javascript">
$(document).ready(function(){
var dialogOptsPass = {
modal: true,
bgiframe: true,
autoOpen: false,
height: 400,
width: 550,
draggable: true,
resizeable: true,
title: "Change your pasword",
};
$("#passwordbox").dialog(dialogOptsPass); //end dialog
$('#passwordbutton').click(
function() {
$("#passwordbox").load("change_password/index.php", [], function(){
$("#passwordbox").dialog("open");
}
);
return false;
}
);
});
</script>
它是更多钞票两个脚本合并????
你试过了吗? – vladv 2010-05-31 12:12:35
我很好奇以谁的形式提问这个问题 – jAndy 2010-05-31 12:14:28
@jAndy:我们可以称它为投票限制吗? – 2010-05-31 12:26:14