jquery幻灯片能够在IE8上运行

jquery slide show able to run on IE8

提问人:Orgil 提问时间:8/23/2020 最后编辑:Orgil 更新时间:8/23/2020 访问量:50

问:

我正在尝试在能够在Internet Explorer 8上运行的jquery上编写幻灯片。
在这里,我附上了要下载的样本
它运行良好,但我想根据月份的某一天从不同的图像开始。
例如,如果是 8 月 23 日,则幻灯片放映必须从第 23 张图像开始。 如果IE9或更高版本没有问题,但是在IE8中,我找不到任何解决方案。
不幸的是,在蒙古,几乎一半的计算机仍然使用IE8。
请帮帮我!! 任何建议将不胜感激!

另举示例:

<!DOCTYPE html>
<html>
<head>
<title>JQuery Cycle Plugin - Basic Demo</title>
<style type="text/css">
.slideshow { height: 265px; width: 120px; margin: 0px}
.slideshow img { padding: 0px; border: 0px solid #ccc; background-color: #eee; }
body {
    margin-top: 0px; 
    margin-bottom: 0px; 
    margin-left: 0px; 
    margin-right: 0px;
    padding: 0;
    overflow: hidden; /* Hide scrollbars */
    -ms-overflow-style: none;  /* IE and Edge */
}
</style>
<!-- include jQuery library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<!-- include Cycle plugin -->
<script type="text/javascript" src="http://malsup.github.com/jquery.cycle.all.js"></script>
<script type="text/javascript">
var slideIndex = 1, delay = 14, delayHandle = 0;
var slides = $('.slideshow');
var imgCount = 3;
var today = new Date();
slideIndex = parseInt(today.getDate());
slideIndex = slideIndex % imgCount;
$(document).ready(function() {
    $('.slideshow').cycle({
        fx: 'fade',
        speed: 100,
        timeout: 5000
    });
});
</script>
</head>
<body>
    <div class="slideshow">
        <a href="http://www.orion.mn/ach-ur.html" class="customfont_menu">
            <img src="reclampanel_slideshow/pic1.jpg" /></a>
        <a href="http://www.orion.mn/ach-ur.html" class="customfont_menu">
            <img src="reclampanel_slideshow/pic2.jpg" /></a>
        <a href="http://www.orion.mn/ach-ur.html" class="customfont_menu">
            <img src="reclampanel_slideshow/pic3.jpg" /></a>
    </div>
</body>
</html>

问候 奥吉尔

下载幻灯片 jQuery Internet-Explorer-8

评论

0赞 mplungjan 8/23/2020
我们不会取消(我什至无法取消)您的文件。请在此处发布一个最小的可重现示例,最好使用代码段编辑器。此外,我什至不认识任何拥有IE8的人 - MS于2016年1月12日终止了对这个古老浏览器的支持[<>]
0赞 Orgil 8/23/2020
感谢您的评论,我编辑了帖子更改了链接。
0赞 mplungjan 8/23/2020
所以我想它可能失败的地方是在循环.js中。任何控制台错误?我在屏幕上看到的脚本中没有任何内容在 IE8 中明显失败,而且您也在使用古老的 jQuery
0赞 Orgil 8/23/2020
这个例子工作正常,只是我不能从特定的图像开始。要启动的图像编号是 var slideIndex。但我不能使用它
0赞 mplungjan 8/23/2020
无需parseInt an int

答: 暂无答案