简体   繁体   English

添加html内容后,轮播会停止工作

[英]Carousel stops working as soon as html content is added

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: 组成轮播的css,html和js如下:

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. 编辑:我无法在JSFiddle中复制该问题,因此,这里是指向工作版本的链接,而一张幻灯片中没有html内容,而没有工作版本。

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

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

Here is the non-working 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>

The working html just has text in the first slide instead of the object tag. 工作的html在第一张幻灯片中仅包含文本,而不是object标签。

Console error: "Load denied by X-Frame-Options: stackoverflow.com does not permit cross-origin framing." 控制台错误:“ X-Frame-Options拒绝加载:stackoverflow.com不允许跨域框架。”

I'm guessing that that's breaking the plugin altogether. 我猜这完全破坏了插件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM