在内容页面中获取jvectormap

时间:2014-05-23 09:43:39

标签: jquery html asp.net jvectormap contentplaceholder

我很难在我的内容页面中获取jvectormap,我在我工作的空白网页表单上进行测试但现在在内容页面上我无法正常工作,

    <asp:Content ContentPlaceHolderID="Head" runat="server">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
    <!-- jvectormap -->
        <script src="js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js" type="text/javascript"></script>
        <script src="js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js" type="text/javascript"></script>
    <script>
        $(document).ready(function () {
            alert("H");
        });
    </script>
</asp:Content>

<asp:Content ContentPlaceHolderID="Body" runat="server">
  <div id="world-map"></div>
</asp:Content>

1 个答案:

答案 0 :(得分:0)

您必须初始化JvectorMap

$(document).ready(function () {
  $('#world-map').vectorMap();
});

http://jvectormap.com/tutorials/getting-started/