Getting jQuery set up with Electron in 3 simple steps

In an attempt to get back to the roots of our programming knowledge while using emerging technology for the first time, we decided to build our first Electron App with jQuery and Vanilla JS.

Sounds pretty simple right? We ran into problems getting jQuery set up and decided to display a simple, working solution.

Solution: — Thanks @jsonnull for the correct answer.

  1. Download compressed, production jQuery file: 
    jQuery Download Page
    Direct Download
  2. In the same directory as your index.html create a jquery.js file. In this file paste the compressed jquery file (pictured below).
  3. Input the two script tags in the bottom of your index.html (pictured below).
<script src=“jquery.js”/>
try {
$ = jQuery = module.exports;
} catch(e) {}
Step 1 and 2 — Paste jQuery into jquery.js
Step 3 — Paste script tags into bottom of index.html


We attempted to follow some of the instructions on a few different websites and ran into a couple of problems while visiting the sites below. We are not saying that they are the wrong implementation but we really struggled getting them to work. If you come up with a better solution, feel free to reach out.

Check out our Electron Color App