[英]JavaScript error no Object [object Object] has no method 'dialog'
I get the error in this questions's title from this page . 我从此页面得到该问题标题的错误。 It isn't a page users see.
用户看不到该页面。 It is a test page I am working on and I copied the general template from here .
这是我正在处理的测试页,我从此处复制了常规模板。
For some reason the latter doesn't get this error and the former does. 由于某种原因,后者没有得到此错误,而前者却得到了。 I checked and I am pretty sure I am importing all the same libraries, so why does the new page give this error?
我检查了一下,很确定要导入所有相同的库,那么为什么新页面会出现此错误?
Any ideas? 有任何想法吗?
The problem is that your index_new
includes 问题是您的
index_new
包含
http://cdn.jquerytools.org/1.2.6/full/jquery.tools.min.js http://cdn.jquerytools.org/1.2.6/full/jquery.tools.min.js
Which overwrites/interferes with the normal .dialog
method. 覆盖/干扰普通的
.dialog
方法。
You have this block of code: 您具有以下代码块:
var $dialog = $('#loginpopup')
.dialog({
autoOpen: false,
title: 'Login Dialog'
});
$('#loginpopup')
is returning an HTML element (a <div/>, specifically), and these don't have any build-in methods called dialog
. $('#loginpopup')
返回一个HTML元素(特别是一个<div />),这些元素没有任何称为dialog
内置方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.