Skip to content

Instantly share code, notes, and snippets.

@chengmu
Last active December 18, 2015 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chengmu/5771443 to your computer and use it in GitHub Desktop.
Save chengmu/5771443 to your computer and use it in GitHub Desktop.
(function(window, document, undefined){
})(this, document)
//anything apart from window and document get passed into it will be treated as undefined;
//this could forbidden the undefined asserssments error
(function(){
doStuff();
setTimeout(arguments.callee, 100);
})()
//异步方式
//使用函数减少一步查询 little performance enhangcement
(function loadMore(){
$('#update').get('awe.php', function(){
loadMore();
})
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment