未捕获的TypeError:对象[object Object]没有方法'colorbox' [英] Uncaught TypeError: Object [object Object] has no method 'colorbox'

查看:74
本文介绍了未捕获的TypeError:对象[object Object]没有方法'colorbox'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想在点击按钮时打开jquery colorbox。

但是它给出了错误。我在网上搜索了这一切 - 所有都指向jquery版本的问题。

但我有单个jquery文件仍然是错误。



下面是我打开彩盒的代码 -





Hi all,

I want to open jquery colorbox on button click.
But it is giving error. I searched on net for this- all are directing to jquery version problem.
But i have single jquery file still it is giving error.

Below is my code to open colorbox-


<script src="js/jquery-1.7.2.min.js" type="text/javascript"></script> 
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="js/jquery.colorbox_assessment.js" type="text/javascript"></script>
<script>
		$(document).ready(function(){
		$(".ajax_assessment").colorbox({iframe:true, width:"60%", height:"50%", overlayClose:false, escKey:false});	
		});
</script>







错误是 -

未捕获TypeError:对象[对象对象]没有方法'colorbox'

(匿名函数)index.aspx:129

c jquery.js:7341

p.fireWith jquery .js:7403

b.extend.ready jquery.js:6875

H




Error is-
Uncaught TypeError: Object [object Object] has no method 'colorbox'
(anonymous function) index.aspx:129
c jquery.js:7341
p.fireWith jquery.js:7403
b.extend.ready jquery.js:6875
H

推荐答案

(文件).ready(function(){
(document).ready(function(){


。ajax_assessment)。colorbox({iframe: true ,width: 60%,身高: 50%,overlayClose: false ,escKey: false });
});
< / script >
(".ajax_assessment").colorbox({iframe:true, width:"60%", height:"50%", overlayClose:false, escKey:false}); }); </script>







错误是 -

未捕获TypeError:对象[对象对象]没有方法'colorbox'

(匿名函数)index.aspx:129

c jquery.js:7341

p.fireWith jquery .js:7403

b.extend.ready jquery.js:6875

H




Error is-
Uncaught TypeError: Object [object Object] has no method 'colorbox'
(anonymous function) index.aspx:129
c jquery.js:7341
p.fireWith jquery.js:7403
b.extend.ready jquery.js:6875
H


请试用此代码...



Please try this code...

<html>
<head id="Head1" runat="server">
    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        function colorboxShow() {


这篇关于未捕获的TypeError:对象[object Object]没有方法'colorbox'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆