jQuery UI dialog插件出错信息:$(this).dialog is not a function

使用jQuery UI 1.8.4 dialog插件,遇到这样的错误:

[img]http://dl.iteye.com/upload/attachment/308166/97c428e4-2ce2-367e-b4df-4c4da7686b95.bmp" alt="" width="210" height="44[/img]



$("#dialog").dialog({
width: 480,
height:"auto",
resizable: false,
draggable: true,
modal: true,
position: "center",
autoOpen: false,
dialogClass: "dialog",
buttons: {"关闭":function(){
$(this).dialog("close");
}}
});

$("#chglogpwd").bind("click",function(){
$("#dialog").dialog("option","height","400");
showModalDialog("#dialog","/accoun/acc/change_logpwd_fm.html?"+new Date().getTime(),"修改登录密码");
});

function showModalDialog(dialogEl,url,title,callback){
var $this = $(dialogEl);
$this.html("");
$this.dialog("option","title",title);
$this.dialog("open");
$this.load(url).removeClass("hideh");
}


调试了很久,发现在当前页面上加载了jquery的js资源,在被load的那个页面中也加载了jquery的资源。
<script type="text/javascript" src="/common/js/jquery-1.4.2.min.js"></script>
尝试将被load的页面中的jquery资源去除,错误便消除。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值