添加html内容后,Carousel就会停止工作(Carousel stops working as soon as html content is added)

编程入门 行业动态 更新时间:2024-10-28 01:18:37
添加html内容后,Carousel就会停止工作(Carousel stops working as soon as html content is added)

我正在使用的这个旋转木马停止工作,一旦我在其中一个幻灯片中添加标签,就可以通过拖动/滑动上一张幻灯片将新幻灯片拖动/滑动到视图中。

组成旋转木马的css,html和js如下:

编辑:我无法在JSFiddle中复制问题所以这里是一个工作版本的链接,没有一个幻灯片中的html内容和非工作版本。

工作: https : //dl.dropbox.com/u/270523/help/carousel/carousel.html

非工作: https : //dl.dropbox.com/u/270523/help/carousel/carousel2.html

这是非工作的html:

<body> <div id="carousel"> <ul> <li class="pane1"><h2>Swipe...</h2><object data="http://stackoverflow.com"><iframe src="http://stackoverflow.com" /></object></li> <li class="pane2"><h2>...or drag...</h2></li> <li class="pane3"><h2>...or swipe...</h2></li> <li class="pane4"><h2>...or drag...</h2></li> <li class="pane5"><h2>...or swipe...</h2></li> </ul> </div> </body>

工作html只在第一张幻灯片中有文本而不是对象标签。

This carousel that I am using stops working, one could drag / swipe a new slide into view by dragging / swiping the previous slide out, once I add an tag inside one of the slides.

The css, html, and js that make up the carousel is as follows:

EDIT: I could not replicate the problem in JSFiddle so here are links to a working version without the html content in one slide and the non-working version with.

Working: https://dl.dropbox.com/u/270523/help/carousel/carousel.html

Non-Working: https://dl.dropbox.com/u/270523/help/carousel/carousel2.html

Here is the non-working html:

<body> <div id="carousel"> <ul> <li class="pane1"><h2>Swipe...</h2><object data="http://stackoverflow.com"><iframe src="http://stackoverflow.com" /></object></li> <li class="pane2"><h2>...or drag...</h2></li> <li class="pane3"><h2>...or swipe...</h2></li> <li class="pane4"><h2>...or drag...</h2></li> <li class="pane5"><h2>...or swipe...</h2></li> </ul> </div> </body>

The working html just has text in the first slide instead of the object tag.

最满意答案

控制台错误:“X-Frame-Options拒绝加载:stackoverflow.com不允许跨源框架。”

我猜这完全打破了插件。

Console error: "Load denied by X-Frame-Options: stackoverflow.com does not permit cross-origin framing."

I'm guessing that that's breaking the plugin altogether.

更多推荐

本文发布于:2023-07-04 10:06:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1023038.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:就会   内容   工作   Carousel   html

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!