Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Twitter引导:未捕获类型错误:对象modal1没有方法';切换';_Javascript_Jquery_Html_Css_Twitter Bootstrap - Fatal编程技术网

Javascript Twitter引导:未捕获类型错误:对象modal1没有方法';切换';

Javascript Twitter引导:未捕获类型错误:对象modal1没有方法';切换';,javascript,jquery,html,css,twitter-bootstrap,Javascript,Jquery,Html,Css,Twitter Bootstrap,我最近做了一个更改,将一些图标作为按钮,使twitter引导模式出现在我的网站上,现在我得到了错误: 未捕获的TypeError:对象modal1没有方法“toggle” 模态在某些情况下看起来被切断了,或者根本没有出现(有许多是动态创建的)。以下是相关代码: 按钮HTML: <a data-toggle="modal" href="#myModal-{{$artist->id}}" class="Details">

我最近做了一个更改,将一些图标作为按钮,使twitter引导模式出现在我的网站上,现在我得到了错误:

未捕获的TypeError:对象modal1没有方法“toggle”

模态在某些情况下看起来被切断了,或者根本没有出现(有许多是动态创建的)。以下是相关代码:

按钮HTML:

 <a data-toggle="modal" href="#myModal-{{$artist->id}}" class="Details">
                                  <span class="fa-stack">
                                  <i class="fa fa-circle-o fa-stack-2x"></i>
                                  <i class="fa fa-plus fa-stack-1x"></i>
                                  </span> 
    </a>
似乎是:

  • 字体可怕脚本的包含干扰了引导脚本的正确加载 或
  • 字体可怕的图标阻止了“a”上的单击事件

  • 您可以提供源代码吗?

    请在jsfiddle上发布您的脚本包含或演示您使用的是bootstrap 2.x.x还是3.x.x?在BS3中,modal没有类
    hide
    。我尝试制作一个JSFIDLE…但看起来失败了。它甚至做情态动词吗?这里是:我尝试添加我正在使用的所有外部文件。jquery是1.9.1,引导文件是2.3.2,我仍然可以点击字体图标。一些情态动词会出现。但有些人不会。。。有些只会部分出现。非常奇怪。屏幕仍然会褪色。我删除了字体可怕的图标,问题仍然存在。
      <div id="myModal-{{$artist->id}}" class="modal hide fade side-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
        <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times fa-lg"></i></button>
        </div>
    
            <div class="modal-body">
              <article class="musicainDEtailImgBox"> <a href="#"><img src="{{$artist->image_path}}" alt="" title="" width="240" height="240"></a>
                <h5>{{$artist->stage_name}}</h5>
        </div>
        </div>
        </div>
    
    if (!data) $this.data('modal', (data = new Modal(this, options)))
          if (typeof option == 'string') data[option]()