0

I'm trying to load html using jqyery. That HTML includes a js file, and every time I try to load it it doesn't execute js file included in it. But when I write the script inside the html page it works fine.

What doesn't work:

<link rel="stylesheet/less" href="/categories/categories.less">
<div id="categories">

</div>
<script type="module" src="/categories/categories.js"></script>

What does work:

<link rel="stylesheet/less" href="/categories/categories.less">
<div id="categories">

</div>
<script >
  console.log('categories has been loaded');
</script>
2
  • @mplungjan trust me I went across all of them, and NOT a single one of them worked. and actually they are a little bit different than mine Commented Nov 11, 2020 at 7:32
  • Try this one Commented Nov 11, 2020 at 7:46

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.