mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 11:53:53 +02:00
Merge pull request #343 from LeeRobertsMe/patch-4
Update plugin-name-admin.js
This commit is contained in:
commit
84741e2c1b
1 changed files with 11 additions and 11 deletions
|
@ -2,31 +2,31 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All of the code for your admin-specific JavaScript source
|
* All of the code for your public-facing JavaScript source
|
||||||
* should reside in this file.
|
* should reside in this file.
|
||||||
*
|
*
|
||||||
* Note that this assume you're going to use jQuery, so it prepares
|
* Note: It has been assumed you will write jQuery code here, so the
|
||||||
* the $ function reference to be used within the scope of this
|
* $ function reference has been prepared for usage within the scope
|
||||||
* function.
|
* of this function.
|
||||||
*
|
*
|
||||||
* From here, you're able to define handlers for when the DOM is
|
* This enables you to define handlers, for when the DOM is ready:
|
||||||
* ready:
|
|
||||||
*
|
*
|
||||||
* $(function() {
|
* $(function() {
|
||||||
*
|
*
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* Or when the window is loaded:
|
* When the window is loaded:
|
||||||
*
|
*
|
||||||
* $( window ).load(function() {
|
* $( window ).load(function() {
|
||||||
*
|
*
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* ...and so on.
|
* ...and/or other possibilities.
|
||||||
*
|
*
|
||||||
* Remember that ideally, we should not attach any more than a single DOM-ready or window-load handler
|
* Ideally, it is not considered best practise to attach more than a
|
||||||
* for any particular page. Though other scripts in WordPress core, other plugins, and other themes may
|
* single DOM-ready or window-load handler for a particular page.
|
||||||
* be doing this, we should try to minimize doing that in our own work.
|
* Although scripts in the WordPress core, Plugins and Themes may be
|
||||||
|
* practising this, we should strive to set a better example in our own work.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
|
Loading…
Reference in a new issue