its javascript, it got nothing to do with jQuery. for example function funcname1(){ /* do something here */ }
now we do something else like setTimeout to trigger the funcname1 setTimeout("funcname1",1000); <-- this will delay until 1 second to trigger the function another way to call it setTimeout(function(){ funcname1(); },1000); <-- this will do the same. basically function is to do a code that was need to be executed as string yet written as normal code... at least that what i learned so far. and it got nothing to do with jQuery it's part of javascript. jQuery use the same coding rules / grammar so that programmer do not need to familiarize with new function as parameter calling. yup, botrh sample i show explain that it use the function as parameter of another function (in this case setTimeout() function). hope it helps Best Regards Darwin Liem --- On Tue, 6/9/09, wangsuya <wang.s...@gmail.com> wrote: From: wangsuya <wang.s...@gmail.com> Subject: [jQuery] jQuery's code first line (function(){・・・・・ To: "jQuery (English)" <jquery-en@googlegroups.com> Date: Tuesday, June 9, 2009, 3:19 AM Hi everyone Know I try to study javascript using jQuery code,but first I do not know why jQuery start with (function(){.... What is "(" function? Why using (function(){ start jQuery? Thanks in advance. Wang Suya