未捕获的TypeError:对象#<object>没有方法'colorbox'匿名函数</object>

时间:2013-08-14 09:24:16

标签: javascript jquery

我正在使用灯箱预览某些图片,所以我在此演示中使用了这个灯箱:这里是a link

因此,当我尝试将其添加到我的网站时,会显示以下错误:

Uncaught TypeError: Object #<Object> has no method 'colorbox' soap:281
(anonymous function) soap:281
(anonymous function)
(anonymous function)
D.extend.each
D.extend.ready

这是我使用的jQuery代码:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
        <script src="<?php echo base_url();?>js/jquery.colorbox.js"></script>
        <script>

            var jQuery_min1 = $.noConflict(true);
            $(document).ready(function(){
                //Examples of how to assign the Colorbox event to elements

                $(".inline").colorbox({inline:true, width:"50%"});

            });
        </script>

在我的图片库中我说了这个:

<ul id="carousel" class="elastislide-list" style="direction: ltr;">
      <?php 
           foreach ($content as $key => $value) {
                 echo '<li><a class="inline" href="#'.$value->p_id.'" ><img src="'. base_url().$value->p_image.'" alt="image01" /></a></li>';
           }                                 
      ?>                                
</ul>
foreach ($content as $key => $value) {
      echo'<div id = "'.$value->p_id.'" style = "display:none;" class="hidden"> 
            <div class="view-product-info">
                <div class="view-product-image">
                      <span class="field-content">
                         <img src="'.base_url().$value->p_image.'" alt="" title="" width="266" height="216" /> 
                      </span>
                 </div>
                 <div class="info" style="display: inline-block;">
                      <div class="views-product-title" >
                                                <br><br>
                           <span class="field-content"><a href="#1">'; if($language == 'ar') echo $value->p_name_ar; else echo $value->p_name; echo'</a></span>
                                                <br>
                       </div>

                  </div>
             </div>
                                </div>';

注意:我使用了很多其他jQuery库..

我该如何解决这个问题?

0 个答案:

没有答案