码迷,mamicode.com
首页 > Web开发 > 详细

jQuery - Functions

时间:2016-07-30 17:58:07      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:

Functions are the basic unit of action in jQuery. 

a function is made up of three parts:

  • the function keyworld
  • any inputs that funciton takes
  • whatever actions the function should perform

 

$(document).ready(function(){

});

 

$(document) is jQuery object. The$() is actually a function in disguise; it turns the document into a jQuery object.

.ready() is a type of function; you can think of it as sort of a helper that runs the code inside its parentheses as soon as the HTML document is ready.

function(){} is the action that.ready() will perform as soon as the HTML document is loaded.

 

jQuery - Functions

标签:

原文地址:http://www.cnblogs.com/elewei/p/5721168.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!