我有一个jQuery插件,超级3.2.7在Chrome和Firefox中工作但只是在IE8中不起作用。图片没有加载。
以下是控制台中显示的错误。
SCRIPT5007: Unable to get value of the property 'thumb': object is null or undefined
supersized.js?ver=3.4, line 13 character 1126
Javascript代码:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="assets/js/supersized.js?ver=3.4"></script>
<script src="assets/js/supersized.shutter.js?ver=3.4"></script>
<script src="assets/js/easing.js"></script>
<script>
jQuery(function($){
jQuery.supersized({
slide_interval: 5000,
transition: 'fade',
transition_speed: 1000,
new_window: 0,
horizontal_center: 1,
progress_bar: 0,
mouse_scrub: 0,
slides:[
{image: 'http://localhost/assets/images/city-at-night.jpg', title: '<h1>Discover More Possibilities...</h1><h2>At Lorem Ipsum, we fulfil your ideas'},
{image: 'http://localhost/assets/images/modern-skyscraper.jpg', title: '<h1>Explore Our Capabilities</h1><h2>Lorem Ipsum Dolor Sit Amet'},
]
});
});
</script>
<script src="assets/js/scripts.js"></script>
任何帮助将不胜感激!
答案 0 :(得分:9)
尝试删除slide数组中的最后一个逗号
slides:[
{image: 'http://localhost/assets/images/city-at-night.jpg', title: '<h1>Discover More Possibilities...</h1><h2>At Lorem Ipsum, we fulfil your ideas'},
{image: 'http://localhost/assets/images/modern-skyscraper.jpg', title: '<h1>Explore Our Capabilities</h1><h2>Lorem Ipsum Dolor Sit Amet'}
]