Syntax Explanation
|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Syntax ExplanationjQuery right now is still like a foreign language to me. I have books, etc. but can someone tell me what's going on here: // Create shortcut for internal use var $jc = $.jcarousel; $jc.fn = $jc.prototype = { jcarousel: '0.2.3' }; what is prototype, and what is jcarousel: '0.2.3', is that just setting some other variable's value? |
||||||||
|
|
Re: Syntax Explanationthis notation $.jcarousel means you want to access that field, whether it be to set it to something else, or read the contents.
jQuery right now is still like a foreign language to me. I have books, etc. but can someone tell me what's going on here: // Create shortcut for internal use var $jc = $.jcarousel; $jc.fn = $jc.prototype = { jcarousel: '0.2.3' }; what is prototype, and what is jcarousel: '0.2.3', is that just setting some other variable's value? |
||||||||
|
|
Re: Syntax ExplanationThanks. so $jc.fn = $jc.prototype $jc is just the entire object and .fn is just a variable/field that was created somewhere else in the code? On Jul 2, 9:44 am, Michael Lawson <mjlaw...@...> wrote: > this notation $.jcarousel means you want to access that field, whether it > be to set it to something else, or read the contents. > this notation in javascript jcarousel: '0.2.3' is setting a key > value pair where jcaraousel is the key and 0.2.3 is the value > > does that make sense? > > cheers > > Michael Lawson > Development Lead, Global Solutions, ibm.com > Phone: 1-276-206-8393 > E-mail: mjlaw...@... > > 'Examine my teachings critically, as a gold assayer would test gold. If you > find they make sense, conform to your experience, and don't harm yourself > or others, only then should you accept them.' > > From: expresso <dschin...@...> > > To: "jQuery (English)" <jquery-en@...> > > Date: 07/02/2009 10:23 AM > > Subject: [jQuery] Syntax Explanation > > jQuery right now is still like a foreign language to me. I have > books, etc. but can someone tell me what's going on here: > > // Create shortcut for internal use > var $jc = $.jcarousel; > > $jc.fn = $jc.prototype = { > jcarousel: '0.2.3' > }; > > what is prototype, and what is jcarousel: '0.2.3', is that just > setting some other variable's value? > > graycol.gif > < 1KViewDownload > > ecblank.gif > < 1KViewDownload |
||||||||
|
|
Re: Syntax ExplanationThats correct!
Thanks. so $jc.fn = $jc.prototype $jc is just the entire object and .fn is just a variable/field that was created somewhere else in the code? On Jul 2, 9:44 am, Michael Lawson <mjlaw...@...> wrote: > this notation $.jcarousel means you want to access that field, whether it > be to set it to something else, or read the contents. > this notation in javascript jcarousel: '0.2.3' is setting a key > value pair where jcaraousel is the key and 0.2.3 is the value > > does that make sense? > > cheers > > Michael Lawson > Development Lead, Global Solutions, ibm.com > Phone: 1-276-206-8393 > E-mail: mjlaw...@... > > 'Examine my teachings critically, as a gold assayer would test gold. If you > find they make sense, conform to your experience, and don't harm yourself > or others, only then should you accept them.' > > From: expresso <dschin...@...> > > To: "jQuery (English)" <jquery-en@...> > > Date: 07/02/2009 10:23 AM > > Subject: [jQuery] Syntax Explanation > > jQuery right now is still like a foreign language to me. I have > books, etc. but can someone tell me what's going on here: > > // Create shortcut for internal use > var $jc = $.jcarousel; > > $jc.fn = $jc.prototype = { > jcarousel: '0.2.3' > }; > > what is prototype, and what is jcarousel: '0.2.3', is that just > setting some other variable's value? > > graycol.gif > < 1KViewDownload > > ecblank.gif > < 1KViewDownload |
| Free embeddable forum powered by Nabble | Forum Help |