Skip to content
Permalink
Newer
Older
100755 36 lines (25 sloc) 1.37 KB
Jan 28, 2020
1
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
2
table of contents](TOC.md)
3
4
# The JavaScript
5
6
Information about the default JavaScript included in the project.
7
8
## main.js
9
10
This file can be used to contain or reference your site/app JavaScript code.
11
If you're working on something more advanced you might replace this file
12
entirely. That's cool.
13
14
## plugins.js
15
16
This file can be used to contain all your plugins, such as jQuery plugins and
17
other 3rd party scripts for a simple site.
18
19
One approach is to put jQuery plugins inside of a `(function($){ ...
20
})(jQuery);` closure to make sure they're in the jQuery namespace safety
21
blanket. Read more about [jQuery plugin
22
authoring](https://learn.jquery.com/plugins/#Getting_Started).
23
24
By default the `plugins.js` file contains a small script to avoid `console`
25
errors in browsers that lack a `console`. The script will make sure that, if
26
a console method isn't available, that method will have the value of empty
27
function, thus, preventing the browser from throwing an error.
28
29
## vendor
30
31
This directory can be used to contain all 3rd party library code.
32
33
Minified versions of the latest jQuery and Modernizr libraries are included by
34
default. You may wish to create your own [custom Modernizr
35
build with the online builder](https://modernizr.com/download/) or [command
36
line tool](https://modernizr.com/docs#command-line-config).
You can’t perform that action at this time.