Including external javascript libraries from github

Question

My aim is include this repository :- web3.js on one of the page in wordpress. I am extremely new to this field and haven’t worked with wordpress, javascript, etc. My friend needs my help to wirte a code for his website. (I have already done it in java once and include libraries in java is fairly simple if we use maven.)

I’ll be using this library’s functions on this specific page, but i am not able to include it on the page. Can someone tell me what is the proper procedure to include this library so that i’ll be able to use it’s functions in the code that i’ll be wiritng under the <script> </script> tags on that page.

One thing i tried is what is said in the link above:

<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"> </script>

OR

<script src="https://unpkg.com/web3@latest/dist/web3.min.js"></script>

But in both cases the, Page gets stuck when it reaches the <script> tag.

0
Hentai Ousama 2 years 2020-09-02T00:10:56-05:00 0 Answers 45 views 0

Leave an answer

Browse
Browse