Skip to content

Commit

Permalink
(doc) how to use jQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziedzic committed Sep 12, 2016
1 parent 117aa0d commit 8c5d25f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ The build script losslessly compresses the images. To disable image compression
## Fonts
To use a font from a CDN (like Google Fonts), place the `<link>` in the `<header>` of each HTML page that requires the font. Local fonts that are included in `source` but are not referenced by a SCSS/CSS/JavaScript file will not be included in the build.

## jQuery
To use jQuery, first install it as a dependency: `npm install --save jquery`. Then include `import $ from 'jquery';` at the top every JavaScript file that uses jQuery.

## Supported Browsers

Use the `browserslist` file to list supported browsers. This affects what vendor prefixes get applied to the CSS, among other things. (See [https://github.com/ai/browserslist](https://github.com/ai/browserslist) for more information on how to use this file).
Expand Down
9 changes: 9 additions & 0 deletions source/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// import $ from 'jquery'; Before using jQuery, install it with `npm install --save jquery`
import './more-javascript/more.js';
import './style/style.scss';
import './style/style.css';
Expand All @@ -7,3 +8,11 @@ const saySomething = (something) => {
};

saySomething('Something! (index.js)');

/*
To use jQuery, first install it as a dependency: `npm install --save jquery`.
Then include `import $ from 'jquery';` at the top every JavaScript file that uses jQuery.
$('span').mouseover(() => {
alert('span span!');
});
*/

0 comments on commit 8c5d25f

Please sign in to comment.