sasan kamali
sasan kamali

Reputation: 13

Major issue in nv.d3.js

I am experiencing something strange! I have used the source code for this: http://nvd3.org/ghpages/stackedArea.html#source_code

I have added this two lines at the begining:

<script src="data/nv.d3.css"></script>
<script src="data/nv.d3.js"></script>

But when I run it it says that:

Uncaught SyntaxError: Unexpected token in nv.d3.css. Resource interpreted as Script but transferred with MIME type text/css

How it is possible that inside a added css we have syntax error! I have downloaded the pakage from the web site. Any idea?

Upvotes: 0

Views: 282

Answers (2)

kevmc
kevmc

Reputation: 1294

Css file needs to be referenced in a <link /> tag

Upvotes: 0

Raibaz
Raibaz

Reputation: 9710

You should import CSS files with <link href="data/nv.d3.css" rel="stylesheet" type="text/css"/>, not with <script>.

Upvotes: 3

Related Questions