0

IQuery の一部であるアプリケーションを開発する必要がありますが、それに慣れていません。コードは、マップ上でマウスをホバーし、マップの背景色とリンクの色を変更するときに実行する必要があります。Chrome と Firefox では機能しますが、Inernet Exlporer では効果がありません。助けてください!

これが私のコードです:

<script type="text/javascript" >
try{
    jQuery(document).ready(function () {

        $.fn.maphilight.defaults = {
            fill: true,
            fillColor: '008000',
            fillOpacity: 0.8,
            stroke: false,
            strokeColor: 'ff0000',
            strokeOpacity: 1,
            strokeWidth: 1,
            fade: true,
            alwaysOn: false,
            neverOn: false,
            groupBy: false
        };
        $(".main-menu").mouseover(function () {
            alert('go');
            var himg = $(this).attr('himg')
            $(this).children().attr('src', himg)
        });

        $(".main-menu").mouseout(function () {
            var nimg = $(this).attr('nimg')
            $(this).children().attr('src', nimg)
        });

        $("a.fancybox").fancybox({
            'titlePosition': 'inside'
        });

        $("a.iframe").click(function () {
            $.fancybox({
                'padding': 0,
                'margin': 0,
                'autoScale': false,
                'transitionIn': 'none',
                'transitionOut': 'none',
                'width': 980,
                'height': 575,
                'href': this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
                'type': 'iframe'
            })
            return false;
        });

        $('#photos').galleryView({
            panel_width: 900,
            panel_height: 300,
            frame_width: 160,
            frame_height: 110
        }); 
        $("#one").sexyCombo({
            emptyText: "Select"
        });
        $("#two").sexyCombo({
            emptyText: "Select"
        });
        $("#three").sexyCombo({
            emptyText: "Select"
        });

    }); 
    }
catch (err)
 {
    alert(err);
 }
</script>
4

1 に答える 1

1

通話を削除しtry-catchます。あなたは本当にそれを必要としていないようで、IEで問題を引き起こしています。

于 2012-04-15T09:05:29.637 に答える