Wikipedia:User scripts/Guide: Difference between revisions

Content deleted Content added
Line 86:
== Running code on page load ==
 
The personal "<code>user"</code> module (built from <kbd>/common.js</kbd>, <kbd>/common.css</kbd> and optionally the skin-specific files for the current skin); see [[#Writing a script from scratch|above]]) and [[Wikipedia:Gadget|gadgets]] are loaded on all pages. Most scripts will want to manipulate elements on the page; to do so the page needs to be ready (which may not be the case at the time the modules are loaded). We can defer execution of code by using a special function.
 
=== <code>$(document).ready(...)</code> ===