Jvector Map不工作准备IE8?

时间:2015-05-27 10:56:59

标签: javascript html css internet-explorer-8 jvectormap

我目前正在使用Jvcetor Map在IE8 browser.document模式下显示错误,浏览器模式显示错误显示错误。但它的工作原理在这里附上我的代码:

 <!DOCTYPE html>
    <html>
    <head>
      <title>Country Footprint</title>
      <script>
        jQuery.noConflict();
        jQuery(function(){
          var $ = jQuery;
          $('#focus-single').click(function(){
            $('#map1').vectorMap('set', 'focus', {region: 'AU', animate: true});
          });
          $('#focus-multiple').click(function(){
            $('#map1').vectorMap('set', 'focus', {regions: ['AU', 'JP'], animate: true});
          });
          $('#focus-coords').click(function(){
            $('#map1').vectorMap('set', 'focus', {scale: 7, lat: 35, lng: 33, animate: true});
          });
          $('#focus-init').click(function(){
            $('#map1').vectorMap('set', 'focus', {scale: 1, x: 0.5, y: 0.5, animate: true});
          });
          $('#map1').vectorMap({
            map: 'world_mill_en',
            panOnDrag: true,
            focusOn: {
              x: 0.5,
              y: 0.5,
              scale: 1,
              animate: true
            },
            series: {
              regions: [{
                scale: ['#688FA0'],
                normalizeFunction: 'polynomial',
                values: {





      </script>

显示网页错误在IE8中。如何在文档模式和浏览器不同时运行?请帮帮我

1 个答案:

答案 0 :(得分:2)

这就像你第五次问完全相同的问题一样?

我已经在评论中回答了这个问题,并且你一直在问同样的问题,使用相同的代码,这里

https://stackoverflow.com/questions/30475659/jvector-map-not-working-correctly-ie-8#comment49031731_30475659

这里是不同的用户,但完全相同的代码

Jvector Map not working when browser Mode and document mode different in IE8

这次尝试听一下,在对象中有一个尾随逗号,用于定义jVectorMap的选项

$('#map1').vectorMap({
    map: 'world_mill_en',
    panOnDrag: true,
    focusOn: {
        x: 0.5,
        y: 0.5,
        scale: 1,
        animate: true
    },
    series: {
        regions: [{
            scale: ['#688FA0'],
            normalizeFunction: 'polynomial',
            values: {
              "TL": 0.62,
              "TO": 0.3,
              "GB": 2258.57,
              "US": 14624.18,
              "VU": 0.72,  // IT'S HERE ----------------
            }
          }]
        },

注意尾随逗号,对象中的最后一个属性不应该有一个尾随逗号,因为后面没有其他属性。

大多数浏览器都不关心,但在旧的IE浏览器中,您会收到与您相同的错误,并且您必须删除最后一个逗号。

相关问题