Most jQuery functions fail silently, that's by design. You must write
your own function if you want to validate the class name being passed.

cheers,
ricardo

On Sep 18, 11:03 am, "~flow" <[EMAIL PROTECTED]> wrote:
> hi all,
>
> i’m doing this in ffx2 and firebug1.05; i have a local document
> loaded, go to the firebug console, and write
>
>   $log( $Q( 'div' ).hasClass( '' ) ); $log( '###' )
>
> to which firebug responds with
>   true
>   ###
>
> thereby showing bot commands did execute. now i repeat the experiment,
> but with
>
>   $log( $Q( 'div' ).hasClass( '.x' ) ); $log( '###' )
>
> the argument to `hasClass` is problematic: it uses selector-syntax and
> starts with a dot. this is a mistake that easily results from copy-n-
> pasting code. acceptable reactions of jQuery to this would be
> responding with something like `null`, `undefined`, or `false`, or
> raising an exception for having been passed a bogus argument.
>
> instead what happens: NOTHING. NADA. firebug displays RIEN de tout.
> this bit me when i wrote a suite of several method calls, one of which
> included dotted class name---the code would run to a certain point,
> then simply VANISH like being swallowed by a black hole. firebug
> breakpoints etc. haven’t helped me so far.
>
> i’m not even sure how to simulate this behavior using only
> javascript---can’t be an early return statement, as then the `###`es
> in the above example would still print out. javascript execution just
> stops silently in some dark dead end. any ideas, anyone?
>
> cheers & ~flow

Reply via email to