bootstraps 4错误:折叠正在转换

任何人都可以帮助我解决转换问题bootstrap 4.这是犯错误未捕获错误:崩溃是转换问题只有当不包括bootstrap css。 在我的情况下bootstrap css冲突我的大css。 任何人都可以帮助解决这个地狱

   
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid.
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid.

此问题已在Bootstrap 4.0.0-beta上得到解决。 4.0.0版本现已上市!

修复JS转换错误 - 图像

有几种方法可以下载它:

  • 以zip文件下载最新版本。
  • 克隆回购: git clone https://github.com/twbs/bootstrap.git
  • 使用npm install bootstrapnpm install bootstrap
  • 用纱线安装: yarn add bootstrap@4.0.0
  • 使用Composer安装: composer require twbs/bootstrap:4.0.0
  • 使用NuGet安装:CSS: Install-Package bootstrap Sass: Install-Package bootstrap.sass

您可以在Beta 1发货清单中找到#21568链接以获取更多信息。


初步答复

Bootstrap v4.0.0-alpha.6版本出现错误,转换将在下一版本中解决。

有关详细信息,请参阅问题22256 , 提取21743和v4.0.0-beta里程碑链接。

暂时 ,您可以使用类似@Nayana_Das示例的变通办法。

使用以下代码折叠div:

 $(".header").click(function () { $header = $(this); //getting the next element $content = $header.next(); //open up the content needed - toggle the slide- if visible, slide up, if not slidedown. $content.slideToggle(500, function () { //execute this after slideToggle is done //change text of header based on visibility of content div $header.text(function () { //change text based on condition return $content.is(":visible") ? "Collapse" : "Expand"; }); }); }); 

看看这个FIDDLE 。

我最近也遇到了旧BT项目的问题。 我的问题很简单,我有两个导航栏,两个都有相同的ID(因为我复制了两次示例)。

这似乎不是这里的情况,但我想我提到它,因为其他人可能会遇到这个问题,并有同样的问题。