jeudi 23 juin 2016

D3 javascript not running in html div


I'm trying to run a d3 javascript file that I got from: bl.ocks.org. I posted the code I'm trying to run below. I'm very new to html, css, bootstrap and javascript, but from my understanding, the script should run inside this section of my html. However, whenever I load the page, the content of the javascript is displayed to the right of the green square (shown below). Is there any reason why the javascript file is not running inside the green square?

<!DOCTYPE html>
<html>
<head>
    <script src="../d3/d3.min.js"></script>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<style>
    .graph_options {
        background-color:rgb(50,150,60);
        color:rgb(255,255,255);
        text-align:center;
        float:left;
        width:20%;
        height:50vh;
    }
</style>
<body>
    <div class="graph_options row-fluid">
        <div class="col-sm-3">
            <script type="text/javascript" src="../javascript/collision.js" ></script>
        </div>
    </div>
</body>
</html>

enter image description here?


Aucun commentaire:

Enregistrer un commentaire