English 中文(简体)
Why won t my Datamaps plugin show up on my Tumblr blog page?
原标题:

Trying to install datamaps plugin onto Tumblr blog page, map won t show up

I m a beginner to coding, and have been trying to install an interactive political on a page of my tumblr; I have received permission from Support to run Javascript on my blog. I ve been following the documentation on the Github and put the following code on page:

<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min.js"></script>
<script src="/datamaps.world.min.js"></script>
<div id="container" style="position: relative; width: 500px; height: 300px;"></div>
<script>
    var map = new Datamap({element: document.getElementById( container )});
</script>

However, nothing shows up when I hit the preview button. Using inspect, the container is present but the map is not.

问题回答

暂无回答




相关问题
Selecting Links in Google Maps InfoWindows w/ jQuery

In my web app, I am using jQuery to select all the links on the page and intercept where they go to so that I can switch to a different part of the page with AJAX. The problem is that some of these ...

Add custom control to Subgurim Maps

Is it possible to add a custom control to the GMap control in the Subgurim library? I see that I can add a GControl with the GMap.AddControl method. I tried to create a custom GControl by ...

Changing the value in a map in Groovy

This is about a very basic program I m writing in Groovy. I have defined a map inside a method: def addItem() { print("Enter the item name: ") def itemName = reader.readLine() print(...

Best way to store and retrieve this..?

I ve been trying all night, and talk of maps, arrays, vectors and hash_maps have filled my head. im just confused now. i posted a previous question here: C++ map really slow? problem was fixed but it ...

热门标签