|
2 | 2 | 'use strict'; |
3 | 3 |
|
4 | 4 | /** |
5 | | - * All of the code for your admin-specific JavaScript source |
| 5 | + * All of the code for your public-facing JavaScript source |
6 | 6 | * should reside in this file. |
7 | 7 | * |
8 | | - * Note that this assume you're going to use jQuery, so it prepares |
9 | | - * the $ function reference to be used within the scope of this |
10 | | - * function. |
| 8 | + * Note: It has been assumed you will write jQuery code here, so the |
| 9 | + * $ function reference has been prepared for usage within the scope |
| 10 | + * of this function. |
11 | 11 | * |
12 | | - * From here, you're able to define handlers for when the DOM is |
13 | | - * ready: |
| 12 | + * This enables you to define handlers, for when the DOM is ready: |
14 | 13 | * |
15 | 14 | * $(function() { |
16 | 15 | * |
17 | 16 | * }); |
18 | 17 | * |
19 | | - * Or when the window is loaded: |
| 18 | + * When the window is loaded: |
20 | 19 | * |
21 | 20 | * $( window ).load(function() { |
22 | 21 | * |
23 | 22 | * }); |
24 | 23 | * |
25 | | - * ...and so on. |
| 24 | + * ...and/or other possibilities. |
26 | 25 | * |
27 | | - * Remember that ideally, we should not attach any more than a single DOM-ready or window-load handler |
28 | | - * for any particular page. Though other scripts in WordPress core, other plugins, and other themes may |
29 | | - * be doing this, we should try to minimize doing that in our own work. |
| 26 | + * Ideally, it is not considered best practise to attach more than a |
| 27 | + * single DOM-ready or window-load handler for a particular page. |
| 28 | + * Although scripts in the WordPress core, Plugins and Themes may be |
| 29 | + * practising this, we should strive to set a better example in our own work. |
30 | 30 | */ |
31 | 31 |
|
32 | 32 | })( jQuery ); |
0 commit comments