question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to jqeury importing to index.html

See original GitHub issue

I am gonna to import jquery to index.html. So I can use jquery in all js file without import $ from 'jquery'.

But it is not working as my thought.

Is it impossible?

Thanks is advance…

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
gaearoncommented, Jun 2, 2017

As I suggested above, instead of adding it to index.html run:

npm install --save jquery

and then use

import $ from 'jquery';

However, if you insist on adding it to HTML, you need to add const $ = window.$ to the top of the file as described in using global variables.

1reaction
kasperpeulencommented, Jun 2, 2017

Maybe try window.$

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add jquery library to an html file? - Stack Overflow
The jQuery library is a single JavaScript file, and you reference it with the HTML tag (notice that ... C:\xampp\htdocs\Firstpage\index.html.
Read more >
How to embed jQuery into HTML page - Makitweb -
1. Download and Include · Navigate to jQuery Official website. · The library is available in two versions – compressed and uncompressed. ·...
Read more >
How to add jQuery to Html - Javatpoint
If we want to add the jQuery to Html page by downloading the jQuery file, then we have to follow the steps which...
Read more >
How To Add jQuery To HTML?
In this method, you have to download the jQuery js file and include it using a simple <script > tag within your HTML...
Read more >
How to add jQuery code to HTML file ? - GeeksforGeeks
Use this link to download the jQuery file from the official JQuery website. · After downloading, just move the downloaded file into the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found