DEV Community

Discussion on: Adding JavaScript to a Django built website

Collapse
 
thepracticaldev profile image
dev.to staff

Hmmm... I think this is the issue

<link href="{% static 'script/introduction.js' %}">
Enter fullscreen mode Exit fullscreen mode

Is this where you're trying to load that external JS file? I think it should look like this:

<script src="{% static 'script/introduction.js' %}"></script>
Enter fullscreen mode Exit fullscreen mode

The <link> tag is for external css and the <script> tag is for js. That may be your issue unless I'm missing something. That seems like an easy mistake to make.

Thread Thread
 
ben profile image
Ben Halpern

Woops. Accidentally used the staff account... Logged in to both in separate windows. Gotta stop doing that 😳

Thread Thread
 
joumanae profile image
Joumana

Hi Ben! Thanks for the feedback. I changed it to &amp; still not working. I think I will just try &amp; find a different way to make the timeline interactive. Thanks for your help. </p>