Thanks guys for the quick reply!!
I did as you suggested (Joel) and i saved some bits;i guess in a
bigger plugin that would be even more useful.

As for the hash thing i need just to identify the first letter after
the hash sign to open the corresponding block when i come from another
page so charAt works fine.

Thank again to everybody
Vitto

On 23 Set, 12:13, "Joel Birch" <[EMAIL PROTECTED]> wrote:
> Some small byte savings:
>
> /* replace this: */
>
> if (hash) {
>     obj.children('a[href=#' + hash + ']').addClass(classe);
>     obj.children('dl[id=' + hash + ']').css({display:'block'});} else {
>
>     obj.children('a:first').addClass(classe);
>     obj.children('dl:first').css({display:'block'});
>
> }
>
> /* ...with this: */
>
> if (hash) {
>     $('> a[href=#' + hash + ']',obj).addClass(classe);
>     $('#'+hash).show();} else {
>
>     $('> a:first',obj).addClass(classe);
>     $('> dl:first',obj).show();
>
> }
>
> There are a few other places where you could replace .children() as
> shown here also.
>
> Joel Birch.

Reply via email to