Resources:
1.w3school Online Tutorial: http://www.w3school.com.cn/jquery/event_ready.asp
2. Someone's blog garden: http://www.cnblogs.com/Look_Sun/archive/2010/02/11/1667482.html
3.jquery1.11.0 Chinese API.
Summary: 3 kinds of writing; 2 notes; 1 questions
1.3 Ways of writing
1 //Syntax 12 3$ (document). Ready (function(){4 //TODO;5 });6 7 //Syntax 28 9$ (). Ready (function(){Ten //TODO; One }); A - //Syntax 3 - the$(function(){ - //TODO; -});
View Code
2. Two notes
* make sure that no function is registered in the OnLoad event of the <body> element, otherwise the +$ (document). Ready () event is not triggered.
* You can use the $ (document) for unlimited times on the same page. The Ready () event. The functions that are registered are executed sequentially in order (in the code).
3. A question
About the $ symbol, seems to be related to the introduction of JS Library, do not understand.
jquery Learning $ (document). Ready ()