[jQuery] Re: Documentation on comparative operators?

2009-01-20 Thread MorningZ
Well, my point was JS operators, whether it be "==" or "===", would be easiest/best in the case of comparing two values... On Jan 20, 6:46 pm, Klaus Hartl wrote: > On 20 Jan., 20:06, MorningZ wrote: > > > but just comparing "value a" to "value b", it doesn't get any easier/ > > better tha

[jQuery] Re: Documentation on comparative operators?

2009-01-20 Thread Klaus Hartl
On 20 Jan., 20:06, MorningZ wrote: > but just comparing "value a" to "value b", it doesn't get any easier/ > better than JavaScript's native "==" operator Not so fast. Be aware that the equality operator may give you unexpected results because of type conversion, example: 0 == '' // => true 0 =

[jQuery] Re: Documentation on comparative operators?

2009-01-20 Thread MorningZ
As Ricardo mentions that still isn't grasped here jQuery *is* JavaScript, but it's a framework on top to make things easier easier in all cases? heck no case in point "So what's the best jQuery way to compare element values" Why would there need to be a jQuery way? object1.value == objec

[jQuery] Re: Documentation on comparative operators?

2009-01-20 Thread fredriley
On Jan 19, 4:28 pm, MorningZ wrote: > If you look @ the document for ".is()" > > http://docs.jquery.com/Traversing/is#expr Ah (light bulb goes off above head), now I get it. It hadn't occurred to me to look in the "Traversing" section of the docs. You really do have to internalise the mindset be

[jQuery] Re: Documentation on comparative operators?

2009-01-19 Thread Ricardo Tomasi
Keep in mind that jQuery is merely a framework. You're still working with plain Javascript. The learning curve for it should be smooth as butter after you get to understand what's going on behind the scenes. is() is a method, a function owned by the current jQuery object. val() returns the value

[jQuery] Re: Documentation on comparative operators?

2009-01-19 Thread MorningZ
If you look @ the document for ".is()" http://docs.jquery.com/Traversing/is#expr Checks the current selection against an expression and returns true, if at least one element of the selection fits the given expression --