Wonderfully in-depth and thorough answer, I really have to reread my JS
books.
- jake
On 5/18/07, Dmitrii 'Mamut' Dimandt <[EMAIL PROTECTED]> wrote:
Look at this article: http://www.hunlock.com/blogs/Functional_Javascript
It explains a lot of things about functions including your question
Look at this article: http://www.hunlock.com/blogs/Functional_Javascript
It explains a lot of things about functions including your question
>
> I found Jörn Zaefferer's "jQuery plugin authoring guide" at
> http://bassistance.de/2006/12/27/jquery-plugin-authoring-guide/,
> there i found javascr
Jack,thank u for your reply!
Eric,your explaination is great! very helpful to me! Thank u again!
God bless you!
Imagine this:
var sayHello = function(name) { alert('Hello, ' + name); }
sayHello('World');
If we don't need to call sayHello more than once, we could make the
function anonymous (not give it a name) and call it directly by
replacing "sayHello" in the second line with the "function..." part
fro
You'll find it everywhere!
the first is a closure, it allows 'some code' to have real local variables
the second is a closure with the added benefit that $ can be used for
jQuery. It's used in plugins just to make sure $ is really jQuery's $ and
not the $ from another library.
there are lots of
5 matches
Mail list logo