Javascript and html problem in the intellij project

Asked

Viewed 91 times

1

I created the index.js file which is composed by the javascript code below:

$(document).ready(function() {
  $("#menu").accordion({collapsible: true, active: false});
});

and put it together with jquery-2.1.1.min. js inside the Java folder of the play framework and intellij project and wanted to use it in conjunction with an index.html code that is in the app->views folder of the project, but I can’t figure out how to use the javascript code in conjunction with the html code of the index.html?

imagem da composição do projeto:

  • What briefcase is that index.js? I only see one hello.js It is not enough to join <script src="caminho/nomeFicheiro.js"></script>&#xA;in HTML after jQuery?

  • It’s hello.js, I took this print before changing the name to index. I tried this but it doesn’t work.

  • Testing <script src="/javascripts/index.js"></script> to the index.js and <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> for the jQuery

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.