On Jan 19, 4:28 pm, MorningZ <morni...@gmail.com> 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 behind jQuery not only to work with it
but even to be able to find your way around the docs which are rather
different from API docs I'm used to (I know, it's not an API as such,
but a framework).

> and also (if you read the docs), .val():
>
> ----------------------------------------------------
> Get the content of the value attribute of the first matched element
> ----------------------------------------------------
>
> So it is not a jQuery object, hence you cannot do jQuery functions on
> it....

Figures. So what's the best jQuery way to compare element values, and
are there comparative operators other than is()? There are comparative
operators to find elements in the DOM hierarchy, but I can't see
anything to compare values, or perhaps I should just use native
Javascript operators.

Thanks to both for the replies - appreciated.

Cheers

Fred

Reply via email to