[jQuery] Re: can someone translate this syntax ?

2009-06-05 Thread Vincent Robert
options = $.extend({ ... }, options) is a popular construct in plugins. It allows to define default values for a options hash that is passed as the only parameter. On Jun 5, 4:22 am, runrunforest craigco...@gmail.com wrote: thank you, I don't see that in other plugin, acutually so far i've not

[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread Andy Matthews
That's called ternary syntax: (expression) ? True : false; If the expression evaluates to true, then the true portion is run, else the false portion is run. A real world example: Var total = (myValue == 15) ? 15 * 3 : myValue / 2; Not helpful, but that's how it's used. As for the other

[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread MorningZ
The commas are just allowing multiple values to be set in one single line, ie/ var running = false, animCss=o.vertical?top:left is the same as var running = false; var animCss=o.vertical?top:left; if you don't understand conditional if statements, an example is that the value of animCss is

[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread runrunforest
thanks man how about $(ul, div)

[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread Andy Matthews
Of runrunforest Sent: Thursday, June 04, 2009 10:54 AM To: jQuery (English) Subject: [jQuery] Re: can someone translate this syntax ? thanks man how about $(ul, div)

[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread runrunforest
thank you so much

[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread runrunforest
ah one more thing in o = $.extend({ afterEnd: null }, o || {}); the o || {} means ?

[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread MorningZ
if the value is null, it will assign it as an empty object On Jun 4, 12:47 pm, runrunforest craigco...@gmail.com wrote: ah one more thing in  o = $.extend({ afterEnd: null }, o || {}); the  o || {}  means ?

[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread Andy Matthews
(English) Subject: [jQuery] Re: can someone translate this syntax ? ah one more thing in o = $.extend({ afterEnd: null }, o || {}); the o || {} means ?

[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread runrunforest
thank you, I don't see that in other plugin, acutually so far i've not yet see the same plugin structure.