开发者

Supersized 3.0 won't work in IE7

i have a problem with Supersized in IE7. I've been searching through all the pages (no comma after array, calling the script properly, etc) and this is my last resort, hopefully someone can help me.

So i'm using the Supersized plugin version 3.0 .

It works fine in all browers execp in IE7 (and IE6 too, but seriously, with at least 7 i'll do).

The image will load full in the page and will then "erase" all the content of the website (like on so many other cases i've seen here), which will in return show again if i disable the Javascript or resize the browsers window.

The code i'm using to call for the image is as follow

if ($option == "com_flexicontent" && $view == "category" && $cid == "1") {?>    
<script type="text/javascript">  
            jQuery(function(){
                jQuery.fn.supersized.options = {  
                    startwidth: 1024,  
                    startheight: 748,
                    transition: 0,
                    vertical_center: 1开发者_如何学运维,
                    slides : [{image : './images/stories/bg/bg_1.jpg' }]
                };
                jQuery('#supersized').supersized(); 
            });
    </script>
<?php } 

It looks so beacuse only one supersized image is used for each page, so a conditional is set in the index.php to arrange which image should be shown in each one (yes, the bit of code in there is copied several times in the index.php file)

I'm using the plug in with Joomla if it helps.. And also here's the adress of the site: http://www.centrointegrador.com.ar/

Every piece of advise is welcome :) Thanks in advance!


When you call supersized in your js file... (example:)

$.supersized({
    slides  :   [
        {
            image : 'img/bg/4.jpg',
            title : ''
        },
        {
            image : 'img/bg/5.jpg',
            title : ''
        },
        {
            image : 'img/bg/6.jpg',
            title : ''
        },
    ],
    keyboard_nav:0,
    random:1
});

Note the trailing comma in the "slides" array. It will make it fail in IE8 or older. IE9 will not fail on the trailing comma.

This will work in IE8 and 7 (for me):

    $.supersized({
    slides  :   [
        {
            image : 'img/bg/4.jpg',
            title : ''
        },
        {
            image : 'img/bg/5.jpg',
            title : ''
        },
        {
            image : 'img/bg/6.jpg',
            title : ''
        }
    ],
    keyboard_nav:0,
    random:1
});

I don't know if this is your problem but this seems to be a common mistake and I thought it was worth mentioning.

Another thing that you can do (if this is not your problem) is check the console inside developer tools in IE (F12).


I'm the creator of Supersized, I would suggest updating the version you're using to 3.2 (available here) and look into using the Core version within that download. The core version is specifically intended for only 1 image background.

This version of Supersized handles IE much better, although I've dropped IE6 support given the extra headache and low % of users - don't feel bad, Google and Wordpress are some others that are doing the same.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜