2017-02-10 9 views
0
<html> 
    <head> 
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> 
<script> 
    (adsbygoogle = window.adsbygoogle || []).push({ 
    google_ad_client: "ca-pub-xxxxxxxxxx", 
    enable_page_level_ads: true 
    }); 
</script> 
    <title>UN World Jobs</title> 
    <meta charset="UTF-8"> 
    <link href="dist/jqvmap.css" media="screen" rel="stylesheet" type="text/css"> 
    <link href="css/bootstrap.min.css" rel="stylesheet"> 

    <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script> 
    <script type="text/javascript" src= " dist/jquery.vmap.js"></script> 
    <script type="text/javascript" src="dist/maps/jquery.vmap.world.js" charset="utf-8"></script> 
    <style> 
    body { 
     padding-top: 70px; 
     /* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */ 
    } 
    </style> 

<style> 
ul { 
    list-style-type: none; 
    margin: 0; 
    padding: 0; 
    overflow: hidden; 
    background-color: #333; 
} 

li { 
    float: left; 
    border-right:1px solid #bbb; 

} 

li:last-child { 
    border-right: none; 
} 

li a { 
    display: block; 
    color: white; 
    text-align: center; 
    padding: 14px 16px; 
    text-decoration: none; 
} 

li a:hover:not(.active) { 
    background-color: #111; 
} 

.active { 
    background-color: #87CEFA; 
} 
</style> 
<script type="text/javascript"> 
     jQuery(document).ready(function() { 
    jQuery('#vmap').vectorMap({ 
    map: 'world_en', 
    onRegionClick: function(element, code, region) { 
     if(code == 'bi'){ 
      window.location.href = 'burundiJobs.html'; 
     } 
     if(code == 'ne'){ 
      window.location.href = "NigerJobs.html"; 
     } 
     if(code == 'ng'){ 
      window.location.href = 'NigeriaJobs.html'; 
     } 
     if(code == 'eg'){ 
      window.location.href = "egyptJobs.html"; 
     }if(code == 'ml'){ 
      window.location.href = 'MaliJobs.html'; 
     } 
     if(code == 'so'){ 
      window.location.href = "SomaliaJobs.html"; 
     }if(code == 'cd'){ 
      window.location.href = 'CongoJobs.html'; 
     } 
     if(code == 'cf'){ 
      window.location.href = "centralJobs.html"; 
     }if(code == 'ke'){ 
      window.location.href = 'KenyaJobs.html'; 
     } 
     if(code == 'lr'){ 
      window.location.href = "liberiaJobs.html"; 
     } 
     if(code == 'na'){ 
      window.location.href = "namibiaJobs.html"; 
     } 
     if(code == 'sd'){ 
      window.location.href = "sudanJobs.html"; 
     } 
     if(code == 'na'){ 
      window.location.href = "namibiaJobs.html"; 
     } 
     if(code == 'sl'){ 
      window.location.href = "sierraleoneJobs.html"; 
     }if(code == 'et'){ 
      window.location.href = "ethiopiaJobs.html"; 
     }if(code == 'zw'){ 
      window.location.href = "zimbabweJobs.html"; 
     }if(code == 'ug'){ 
      window.location.href = "ugandaJobs.html"; 
     }if(code == 'dj'){ 
      window.location.href = "djiboutiJobs.html"; 
     }if(code == 'tz'){ 
      window.location.href = "tanzaniaJobs.html"; 
     }if(code == 'cm'){ 
      window.location.href = "cameroonJobs.html"; 
     } 

    } 
    }); 
    }); 
    </script> 

<script> 
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 

    ga('create', 'UA-91634038-1', 'auto'); 
    ga('send', 'pageview'); 

</script> 
    </head> 
    <body> 
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> 
     <div class="container"> 
      <!-- Brand and toggle get grouped for better mobile display --> 
      <div class="navbar-header"> 
       <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> 
        <span class="sr-only">Toggle navigation</span> 
        <span class="icon-bar"></span> 
        <span class="icon-bar"></span> 
        <span class="icon-bar"></span> 
       </button> 
       <a class="navbar-brand" href="#">Start Bootstrap</a> 
      </div> 
      <!-- Collect the nav links, forms, and other content for toggling --> 
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> 
       <ul class="nav navbar-nav"> 
        <li> 
         <a href="#">About</a> 
        </li> 
        <li> 
         <a href="#">Services</a> 
        </li> 
        <li> 
         <a href="#">Contact</a> 
        </li> 
       </ul> 
      </div> 
      <!-- /.navbar-collapse --> 
     </div> 
     <!-- /.container --> 
    </nav> 

    <h2 style="text-align: center; font-family: Arial Black,Arial Bold,Gadget,sans-serif; "> Welcome to UN World Jobs, please pick a country you would like to work.</h2> 
    <div id="vmap" style="width: 800; height: 600; 
    margin: 0 auto; "></div> 

<!-- jQuery Version 1.11.1 --> 
    <script src="js/jquery.js"></script> 

    <!-- Bootstrap Core JavaScript --> 
    <script src="js/bootstrap.min.js"></script> 

    </body> 
</html> 

上記のコードは、JQVmapを持つブートストラップの空白のテンプレートコードです。私はブラウザを開くと、マップがコンソールにロードし、私は、このエラーを与えません。JQVmapがブートストラップでロードされていない

TypeError: jQuery(...).vectorMap is not a function[Learn More]. 

マイJQVmapフォルダはすべて存在しています。

+0

を働いてください持っていますあなたのフルコードの代わりに[mcve]で質問を書いてください。これは、秘密のデータ( 'google_ad_client')を誤って公開することを避け、重要でないものはすべて(おそらく)修正されるため、実際のエラーを把握するのに役立ちます。 –

答えて

0

あなたは、<script>タグ

<script type="text/javascript" src= " dist/jquery.vmap.js"></script> 

内の余分なスペースが

<script type="text/javascript" src= "dist/jquery.vmap.js"></script> 
+0

申し訳ありませんが、これは何も変更されませんでした。 –

0

である必要があり、私は非常に先頭にjqueryのを追加し、それが将来的に

 <link href="css/bootstrap.min.css" rel="stylesheet"> 
    <!-- jQuery Version 1.11.1 --> 
    <script src="js/jquery.js"></script> 

    <!-- Bootstrap Core JavaScript --> 
    <script src="js/bootstrap.min.js"></script> 

    <link href="dist/jqvmap.css" media="screen" rel="stylesheet" type="text/css"> 

    <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script> 
    <script type="text/javascript" src= " dist/jquery.vmap.js"></script> 
    <script type="text/javascript" src="dist/maps/jquery.vmap.world.js" charset="utf-8"></script> 
関連する問題